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
//////////////////////////////////////////////////////// | |
// Moved to https://github.com/rudiedirkx/Auto-indent // | |
//////////////////////////////////////////////////////// | |
/** | |
* To do: | |
* - tab/shift tab: (un)indent a line on command | |
* - 'mass tab': select several lines and (un)indent them all (requires TAB) | |
* - support for undo/redo, by using `execCommand('insertText')` |
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
window.requestAnimationFrame || (window.requestAnimationFrame = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(cb) { | |
return setTimeout(cb, 1000 / 60); | |
}); |
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
<?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 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: | |
([].forEach.call(document.scripts, function(el, p) { | |
var code = el.innerHTML.trim(); | |
if ( (p = code.indexOf('q("talkPage.init",')) > -1 ) { | |
var json = code.slice(p + 18, -1).trim(); | |
var talk = JSON.parse(json).talks[0]; | |
var url = talk.nativeDownloads.high || talk.nativeDownloads.medium; | |
var a = document.createElement('a'); | |
a.href = url; | |
a.download = url.match(/([^\/\?]+)(\?.+?)?$/)[1]; |
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
<?php | |
writeln(); | |
writeln('starting...'); | |
write('Progress: [ 0 % ]'); | |
for ( $i=1; $i<=100; $i++ ) { | |
usleep(rand(100, 100000)); |
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
html, body { | |
background: white !important; | |
line-height: 1.4; | |
} | |
.wrapper, .wrapper-narrow, .wrapper-permalink { | |
width: 1100px; | |
} | |
.content-main { | |
width: 787px; |
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
.form-type-link-field { | |
display: -webkit-flex; | |
} | |
.form-item.form-type-link-field > :last-child { | |
-webkit-order: -1; | |
} |
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
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 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
// Mine mine mine | |
(function() { | |
// Create iframe | |
var iframe = document.createElement('iframe'); | |
document.currentScript.parentNode.appendChild(iframe); | |
})(); |
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
javascript: | |
location = '/user/login?destination=' + | |
encodeURIComponent(location.pathname.substr(1) || '<front>'); | |
void(0); |