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
javascript: | |
jQuery('select').each(function(i, el) { | |
el.selectedIndex = 1 + parseInt(Math.random() * (el.options.length-1)); | |
}); | |
jQuery('input:not([type]), input[type="text"], textarea').val(function() { | |
return ['Lorem', 'Ipsum', 'Dolor'][ parseInt(Math.random() * 3) ]; | |
}); | |
void(0); |
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
.form-type-link-field { | |
display: -webkit-flex; | |
} | |
.form-item.form-type-link-field > :last-child { | |
-webkit-order: -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
html, body { | |
background: white !important; | |
line-height: 1.4; | |
} | |
.wrapper, .wrapper-narrow, .wrapper-permalink { | |
width: 1100px; | |
} | |
.content-main { | |
width: 787px; |
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 | |
writeln(); | |
writeln('starting...'); | |
write('Progress: [ 0 % ]'); | |
for ( $i=1; $i<=100; $i++ ) { | |
usleep(rand(100, 100000)); |
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 | |
$files = glob('*'); | |
$sizes = array_map('filesize', $files); | |
$count_sizes = array_count_values($sizes); | |
$doubles = count($sizes) - count($count_sizes); | |
// var_dump($doubles); |
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 | |
snap('init'); | |
define('LL_TAB_SIZE', 4); | |
define('LL_TOO_LONG', 130); | |
define('LL_WAY_TOO_LONG', 220); | |
ini_set('html_errors', 0); |
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
/* From https://gist.github.com/MadRabbit/996893 */ | |
function Bezier(p1, p2, p3, p4) { | |
var Cx = 3 * p1, | |
Bx = 3 * (p3 - p1) - Cx, | |
Ax = 1 - Cx - Bx; | |
var Cy = 3 * p2, | |
By = 3 * (p4 - p2) - Cy, | |
Ay = 1 - Cy - By; |
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
window.requestAnimationFrame || (window.requestAnimationFrame = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(cb) { | |
return setTimeout(cb, 1000 / 60); | |
}); |
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 /* | |
exports.user = 'root'; | |
exports.password = 'secret password'; | |
exports.database = 'games'; | |
// */ |
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.matchesSelector || (Element.prototype.matchesSelector = Element.prototype.webkitMatchesSelector || Element.prototype.mozMatchesSelector || function(selecta) { | |
var els = document.querySelectorAll(selecta); | |
for ( var i=0, L=els.length; i<L; i++ ) { | |
if ( els[i] == this ) { | |
return true; | |
} | |
} | |
return false; | |
}); |