Skip to content

Instantly share code, notes, and snippets.

View Fedik's full-sized avatar
🐢

Fedir Zinchuk Fedik

🐢
  • Ukraine
View GitHub Profile
@Fedik
Fedik / google.xml
Last active August 29, 2015 14:27 — forked from cmtsij/google.xml
Custom "Google Map" source for Mobile Atlas Creator 1.9.16
<!--
custom "Google Map" source for Mobile Atlas Creator 1.9.16
save in *.xml and move to /mapsources
-->
<customMapSource>
<name>Google Map</name>
<minZoom>0</minZoom>
<maxZoom>20</maxZoom>
<tileType>PNG</tileType>
@Fedik
Fedik / gist:4be893cf5c1265081031
Last active August 29, 2015 14:10
Git Aliase - test pull request
# test pull request for remote repository on github
# use:
# git test-pull REMOTE_NAME PULL_NUMBER
test-pull = "!f() { last_commit=$(git log -n 1 --pretty=format:\"%h\") && git fetch $1 pull/$2/head:pull$2 && git merge pull$2 -m \"Merge pull $2\" && echo \"Use for revert: git reset $last_commit && git reset --hard && git branch -D pull$2\"; }; f"
# revert, not work in some cases, be aware :smile:
# use
# git test-revert PULL_NUMBER
test-revert = "!f() { commit=$(git log --grep=\"Merge pull $1\" --pretty=format:\"%h\") && previous_commit=$(git log --reverse $commit -n 1 --skip=1 --pretty=format:\"%h\") && git reset $previous_commit && git reset --hard && git branch -D pull$1; }; f"
@Fedik
Fedik / gist:35557c4d6bb2a385b3c2
Last active August 29, 2015 14:07
chosen.js and bootstrap tooltip gag
(function($){
// chosen gag
$.fn.chosen = function(){
// do nothing
return this.each(function() {
$(this).data('chosen', {});
});
}
// tooltips gag
$.fn.tooltip = function(){
@Fedik
Fedik / jQuery.dummyPlugin.js
Last active August 29, 2015 14:05
jQuery.dummyPlugin
;(function($){
"use strict";
$.dummyPlugin = function(element, options){
self.$element = $(element);
// merge options
this.options = $.extend({}, $.dummyPlugin.defaults, options);