start new:
tmux
start new with session name:
tmux new -s myname
#!/usr/bin/env python | |
# let's cheat at scrabble | |
def count_letters(word): | |
count = {} | |
for letter in word: | |
if letter not in count: count[letter] = 0 | |
count[letter] += 1 | |
return count |
-- 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%' |
##### COLORS ##### | |
NO_COLOR="\[\033[0m\]" | |
LIGHT_WHITE="\[\033[1;37m\]" | |
WHITE="\[\033[0;37m\]" | |
GRAY="\[\033[1;30m\]" | |
BLACK="\[\033[0;30m\]" | |
RED="\[\033[0;31m\]" | |
LIGHT_RED="\[\033[1;31m\]" | |
GREEN="\[\033[0;32m\]" |
├── bin # random scripts | |
├── data # db bootstrap files | |
├── devops # salt in our case | |
└── src # code | |
├── ... # a bunch of packages as if they were individual repos | |
└── cmd | |
├── app1 | |
└── appN # all of these are main packages that build our service binaries |
Notes have been moved here: https://github.com/shazow/learning-opengl
Old versions of the notes that were here are still available as revisions of this gist. Previous revision: https://gist.github.com/shazow/d869952642fe081466fa/70d92e7aac66be8ce9217b06d45fc6441af7b06c
time go run timeoutreader.go http://www.example.com/ simple 1s >/dev/null | |
time go run timeoutreader.go http://www.example.com/ anything-but-simple 1s >/dev/null | |
time curl http://www.example.com/ >/dev/null |