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
for f in *; do git mv -f "$f" "`echo $f | tr "[:upper:]" "[:lower:]"`"; 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
// Can be used with e.g. Control Freak | |
if (window.location.pathname === "/ad/locked") { | |
var time = +$("#countdown").text() || 6; | |
setTimeout(function () { | |
window.location.href = window.location.href; | |
}, time * 1000); | |
} else { | |
var myfunc = function () { | |
if (typeof $("#skip_button").attr("href") == "undefined" || $("#skip_button").attr("href") == null || $("#skip_button").attr("href").length === 0) { | |
setTimeout(myfunc, 500); |
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
cmap w!! %!sudo tee > /dev/null % |
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
find /path/to/base/dir -type d -ctime +10 -exec rm -rf {} \; |
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
" Fixes some issues | |
set nocompatible | |
" Required by Vundle (init) | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'bling/vim-airline' | |
Plugin 'airblade/vim-gitgutter' | |
Plugin 'mattn/emmet-vim' |
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
<!-- | |
Just simply type 'module', press Tab, then enter the name of the "module", | |
press Tab again and then either press Backspace to remove JQuery "support" | |
or press Tab once more to finish. | |
This creates an anonymous self-executing function which is a design pattern | |
that can be seen in e.g. jQuery's source code. | |
One of the major benefits of this pattern is that you can limit access to | |
variables and functions within your closure, essentially making them private |
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
/* | |
* Author: Maciej Baron | |
*/ | |
;(function (SimpleDebug, $, undefined) { | |
/* | |
* Simple debugging | |
*/ | |
var debugEnabled = false; |
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
echo Enter username; read i; echo "curl https://api.github.com/users/$i/events -s" | sh | grep message | sed -e 's/ "message": //g' -e 's/",/"/g' |
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
echo "last | grep shutdown | grep -v $USER" | sh | awk '{print "On "$3", "$4" "$5" finished at "$6}' |
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 (!("placeholder" in document.createElement("input"))) { | |
$("[placeholder]").each(function () { | |
var placeholder = $(this).attr("placeholder"); | |
$(this).val(placeholder).focus(function () { | |
if ($(this).val() === placeholder) { | |
$(this).val(""); | |
} | |
}).blur(function () { | |
if ($(this).val().length === 0) { | |
$(this).val(placeholder); |
OlderNewer