This file contains 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
@mixin placeholder() { // using a mixing cause extending a class will result in parse failure | |
// your styles go here | |
} | |
[placeholder] {@include placeholder()} | |
:-moz-placeholder {@include placeholder()} | |
::-moz-placeholder {@include placeholder()} | |
:-ms-input-placeholder {@include placeholder()} | |
::-o-placeholder {@include placeholder()} | |
::-webkit-input-placeholder {@include placeholder()} |
This file contains 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
if (!document.querySelectorAll) { | |
document.querySelectorAll = function (selectors) { | |
var style = document.createElement('style'), elements = [], element; | |
document.documentElement.firstChild.appendChild(style); | |
document._qsa = []; | |
style.styleSheet.cssText = selectors + '{x-qsa:expression(document._qsa && document._qsa.push(this))}'; | |
window.scrollBy(0, 0); | |
style.parentNode.removeChild(style); |
This file contains 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
// ECMA-262, Edition 5, 15.4.4.18 | |
// Référence: http://es5.github.io/#x15.4.4.18 | |
if (!Array.prototype.forEach) { | |
Array.prototype.forEach = function(callback, thisArg) { | |
var T, k; | |
if (this === null) { | |
throw new TypeError(' this vaut null ou n est pas défini'); |
This file contains 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
$is_valid = preg_match('/^[A-Za-z][A-Za-z0-9]*(?:_[A-Za-z0-9]+)*$/', $str); |
This file contains 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
#!/bin/sh | |
set -e | |
set -x | |
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f2) | |
do | |
npm -g install "$package" | |
done |
This file contains 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
#!/bin/sh | |
brew list -1 | while read line; do brew unlink $line; brew link $line; done |
This file contains 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
ln -s /Applications/Sublime Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl | |
chmod a+x /usr/local/bin/subl | |
# OR | |
ln -s /Applications/Sublime Text.app/Contents/SharedSupport/bin/subl ~/bin/subl | |
chmod a+x ~/bin/subl |
This file contains 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
diff -Naur standard_moodle my_moodle > patch.txt |
This file contains 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
body { | |
font: font-style font-variant font-weight font-size/line-height font-family; | |
} |
This file contains 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() { | |
var interval = 2000; | |
var failLimit = 20; | |
var stopped = 0; | |
var tick = setInterval(function() { | |
var ph = document.body.clientHeight; | |
var top = window.pageYOffset; | |
var ih = window.innerHeight; | |
if (ph > top + ih) { |
OlderNewer