Graph with author and commit hash:
git config --global alias.plog 'log --graph --pretty=format:\"%C(yellow)%h%x20%C(green)%an%x20%Creset%s\"'
<?php | |
function hello($arg = 'World') { | |
// sanitize arguments | |
$arg = $arg ?: 'World'; | |
// return message | |
return "Hello {$arg}!"; | |
<?php | |
// looking for the spoiler image mentioned in https://twitter.com/notch/status/84361767962161152 | |
$letters = array_merge(range('a', 'z'), range('A', 'Z')); | |
foreach ($letters as $letter) { | |
$image = 'http://i.imgur.com/IKc7' . $letter . '.png'; | |
print '<img src="' . $image . '" alt="Is is this one?" style="display: block; margin: 0 0 20px 0"/>'; | |
} |
# represents a person | |
class Person | |
# properties | |
name: null | |
alive: true | |
stomach: 0 | |
bladder: 0 | |
tmp_prefix="/usr/local/bin/" | |
echo "git pull;" > $tmp_prefix-; | |
echo "git push;" > $tmp_prefix=; | |
echo "git pull && git push;" > $tmp_prefix-=; | |
chmod 755 $tmp_prefix- $tmp_prefix= $tmp_prefix-=; |
// Allows specifying default variables in LESS | |
// Some really sneaky shit that will shoot me in the foot if | |
// LESS changes too much... | |
@--lol: ~`"" + ( root._less = root._less || this )`; | |
@--lol: ~`"" + ( root.getLessVar = function (name) { return root._less[name] ? root._less[name].toJS() : '' } )`; | |
@--lol: ~`"" + ( root.getLessVarDefault = function (name, def) { return root.getLessVar(name) !== '' ? root.getLessVar(name) : root.getLessVar(def) } )`; | |
// Example: |
(based on this post which I don't like because they tell you to add a bash file to your home directory)
Run the following commands to begin:
cd /usr/local/bin && curl https://github.com/git/git/raw/master/contrib/completion/git-completion.bash -OL
<!DOCTYPE html> | |
<meta charset="utf-8"/> | |
<title>↑ ↑ ↓ ↓ ← → ← → B A</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> | |
<script src="konami.js"></script> | |
<script> | |
// On document ready |
$foo: 'bar' !default; | |
// ...do stuff |
In no particular order...
Alfred App
A replacement for spotlight search, with a bunch of useful productivity tools.
http://www.alfredapp.com/
Divvy
An awesome window manager.
http://mizage.com/divvy/