Skip to content

Instantly share code, notes, and snippets.

View Ropes's full-sized avatar

Josh Roppo Ropes

View GitHub Profile
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
@shazow
shazow / learning-opengl.md
Last active August 14, 2018 18:36
Notes on learning OpenGL
├── 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
@pamo
pamo / colors.sh
Last active February 10, 2022 04:46
WWC Bash Prompt Customizaton
##### 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\]"
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active April 23, 2024 19:14
Useful PostgreSQL Queries and Commands
-- 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%'
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 25, 2024 06:23
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@amundo
amundo / cheat_at_scrabble.py
Created March 30, 2011 09:12
A simple tool for finding the highest scoring words with a scrabble rack
#!/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