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
var args = location.search.substr(1) | |
.split('&') | |
.map(function (pair) { | |
pair = pair.split('='); | |
try { | |
pair[1] = pair[1] !== undefined ? decodeURIComponent(pair[1]) : true; | |
if (typeof pair[1] === 'string') { | |
pair[1] = pair[1].replace(/\+/g, ' '); | |
if (pair[1].indexOf(',') !== -1) { | |
pair[1] = pair[1].split(','); |
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
git filter-branch --commit-filter \ | |
'if [ "$GIT_AUTHOR_NAME" = "OldAuthor Name" ]; then \ | |
export GIT_AUTHOR_NAME="Author Name";\ | |
export [email protected];\ | |
export GIT_COMMITTER_NAME="Commmiter Name";\ | |
export [email protected];\ | |
fi;\ | |
git commit-tree "$@"' |
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 RusToTranslit( text ) { | |
return text.replace(/([а-яё])|([\s_-])|([^a-z\d])/gi, | |
function(all, ch, space, words, i) { | |
if (space || words) { | |
return space ? '-' : ''; | |
} | |
var code = ch.charCodeAt(0), | |
next = text.charAt(i+1), | |
index = code == 1025 || code == 1105 ? 0 : code > 1071 ? code - 1071 : code - 1039, |
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
.ir { | |
text-indent: 100%; | |
white-space: nowrap; | |
overflow: hidden; | |
} |
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
.ir { | |
border: 0; | |
font: 0/0 a; | |
text-shadow: none; | |
color: transparent; | |
background-color: transparent; | |
} |
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
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
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
/* @paul_irish Pub/Sub | |
* Works in modern browsers + IE9 | |
* Use Modernizr ployfill for function.bind */ | |
(function($) { | |
var o = $({}); | |
$.subscribe = o.on.bind(o); | |
$.unsubscribe = o.off.bind(o); | |
$.publish = o.trigger.bind(o); | |
}(jQuery)); |
NewerOlder