Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
[alias] | |
wip = !"git add -A; git ls-files --deleted -z | xargs -0 git rm; git commit -m \"wip\"" | |
unwip = !"git log -n 1 | grep -q -c wip && git reset HEAD~1" | |
rb = !"git wip;git rebase -i origin/master;git unwip" | |
pr = !"git fetch;git wip;git rebase --stat origin;git unwip;git heads" | |
head = !"git log -n1" | |
lost = !"git fsck | awk '/dangling commit/ {print $3}' | git show --format='SHA1: %C(yellow)%h%Creset %f' --stdin | awk '/SHA1/ {sub(\"SHA1: \", \"\"); print}'" | |
heads = !"git log origin/master.. --format='%Cred%h%Creset;%C(yellow)%an%Creset;%H;%Cblue%f%Creset' | git name-rev --stdin --always --name-only | column -t -s';'" |
require 'git' | |
module Jekyll | |
class GitActivityTag < Liquid::Tag | |
def initialize(tag_name, text, tokens) | |
super | |
end | |
def render(context) |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
# the following two lines give a two-line status, with the current window highlighted | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]' | |
# huge scrollback buffer | |
defscrollback 5000 | |
# no welcome message | |
startup_message off |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
Example output, where |
is the cursor:
function () {
|
};
foo(function () {
Find it here: https://github.com/bitemyapp/learnhaskell
#!/usr/bin/env python2.7 | |
import collections | |
import os | |
import re | |
import readline | |
import subprocess | |
tty_bold = '\x1b[1m' | |
tty_af = '\x1b[{}m'.format |
Here's a picture of Desert Golfing Hole 2866, which even the developer believed was impossible at first.
And here it is together with a picture of the following hole, 2867.
As you probably know, even though the next hole is off the screen and invisible, you can still bounce the ball off of its landscape features and back into the playfield. You can do a hail-Mary shot from the tee on 2866, aiming for the offscreen hill on the far side of the water hazard (which technically belongs to hole 2867). It will bounce off the hill and straight into the hole.