Let there be beer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function($){ | |
"use strict"; | |
$.dummyPlugin = function(element, options){ | |
self.$element = $(element); | |
// merge options | |
this.options = $.extend({}, $.dummyPlugin.defaults, options); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
// chosen gag | |
$.fn.chosen = function(){ | |
// do nothing | |
return this.each(function() { | |
$(this).data('chosen', {}); | |
}); | |
} | |
// tooltips gag | |
$.fn.tooltip = function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Element.prototype.hasClassName = function(className) { | |
return this.classList ? this.classList.contains(className) : !!this.className.match(new RegExp('(\\s|^)' + className + '(\\s|$)')); | |
} | |
Element.prototype.addClass = function(className) { | |
if (this.classList){this.classList.add(className);} | |
else if (!this.hasClass(className)){this.className += " " + className;} | |
return this; | |
} | |
Element.prototype.removeClass = function(className) { | |
if (this.classList){this.classList.remove(className);} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (global) { | |
if ( !global.Event && !('keys' in Object) && !('bind' in Function) ) { return } | |
var eventProto = Event.prototype, | |
EVENTS = { | |
'mouse': [ 'click', 'dblclick', 'contextmenu', 'mousedown', 'mouseup', 'mouseover', 'mousemove', 'mouseout', 'drag', 'dragend', 'dragenter', 'dragleave', 'dragover', 'drop'], | |
'key': [ 'keydown', 'keypress', 'keyup', 'input'], | |
'res': [ 'load', 'unload', 'beforeunload', 'abort', 'error', 'resize', 'scroll', 'readystatechange' ], | |
'form': [ 'select', 'change', 'submit', 'reset', 'focus', 'blur' ], | |
'ui': [ 'DOMFocusIn', 'DOMFocusOut', 'DOMActivate', 'DOMCharacterDataModified', 'DOMNodeInserted', 'DOMNodeRemoved', 'DOMSubtreeModified' ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Convert date/time format between `date()` and `strftime()` | |
* | |
* Timezone conversion is done for Unix. Windows users must exchange %z and %Z. | |
* | |
* Unsupported date formats : S, n, t, L, B, G, u, e, I, P, Z, c, r | |
* Unsupported strftime formats : %U, %W, %C, %g, %r, %R, %T, %X, %c, %D, %F, %x | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity. | |
* | |
* BIC pattern: BBBBCCLLbbb (8 or 11 characters long; bbb is optional) | |
* | |
* BIC definition in detail: | |
* - First 4 characters - bank code (only letters) | |
* - Next 2 characters - ISO 3166-1 alpha-2 country code (only letters) | |
* - Next 2 characters - location code (letters and digits) | |
* a. shall not start with '0' or '1' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import argparse, sys, markdown | |
TEMPLATE = """<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="referrer" content="no-referrer" /> | |
<meta name="referrer" content="unsafe-url" /> |
OlderNewer