Skip to content

Instantly share code, notes, and snippets.

zmagg zmagg

Block or report user

Report or block zmagg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zmagg
zmagg / word_games.py
Last active Dec 21, 2015
hacker school mini improvised contest for the fastest solution to find what words are the longest anagrams of each other (single words, please, no phrases) in the sowpods scrabble dictionary.
View word_games.py
f = open("sowpods.txt", "r")
canonized_words = {}
word1 = ""
word2 = ""
max_len = 0
for line in f:
if len(line) > max_len:
sorted_word = ''.join(sorted(line))
@zmagg
zmagg / GuavaCollection2
Created Aug 23, 2013
share guava test file.
View GuavaCollection2
import com.google.common.base.Predicates;
import com.google.common.collect.Collections2;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import static java.lang.System.out;
/**
View gist:8a4302cdd696a6d575f1
syntax on
set number
filetype plugin on
set nocompatible
set modelines=0
filetype plugin indent on
syntax on
set expandtab
View gist:2298aa5c25e301b566b1
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
# bash history
export HISTSIZE=20000
shopt -s histappend
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
alias gdiff='gist -t diff'
View gist:03bfbe561d48326ffe0b
freud --- civilization and its discontents
freud --- the new introductory lectures on psycho-analysis
lacan --- seminars (choose 2)
( a few other essays, TBD)
View gist:0f25e57f950dd2963ebd
vegetarian friendly:
BAGELS (fairmount / st viateur)
arepera du plateau (delicious)
bangkok (thai food in a food court) maja knows a thai place that delivers though I think!
burritoville (adorable vegan place with sweet potato burritos and lemonade)
la panthere verte (my favorite falafels in montreal; mostly vegan). several locations.
omnivore (hummus and eggplant dips and tasty salads <3)
ice cream: MuuMuu and kem coba are both excellent.
indian food in park extension (bombay mahal or maison indian curry; they're across the street from each other)
View gist:e7307ea2adf6cd510e95

Etsy started with a monolithic Postgres database and moved to a horizontally sharded MySQL store with a lookup table and master-master replication. Scaling your data store is never easy as just adding more hardware though, even with sharding.

In this talk, we'll go over the pains and perils of sharding databases and how we solved some of the problems in Etsy's second take on sharding, what we call logical sharding. Logical sharding is where we put several databases on one mysqld, as opposed to one database per server. Upon hitting a resource limit on a box (CPU, Memory, Connections, etc) that would normally require individual row migration, we can instead do file level migrations of a database, replicate, then drop previous databases, which is super fast and a cleaner way to delete old unnecessary shard data. We'll also go over how logical sharding benefits other daily operational challenges like schema changes and backups, as well as simplies life for developers and makes life easier for downstream data wa

@zmagg
zmagg / gist:133c4febd84dbab394af
Last active Oct 24, 2015
packing list for amsterdam, portugal
View gist:133c4febd84dbab394af
backpack
waterproof interior bag (i don't really need it, but maybe someone i'm traveling with will like it? also laundry)
raincoat
3 t-shirts
3 pairs of underwear (lol)
2 pairs of wool socks
2 pairs of cotton socks
one heavyish wool sweater (purple)
one light merino sweater (black)
one merino liner layer thin long sleeved (black)
@zmagg
zmagg / gist:10e2bcd383ae286dbe7e
Last active Jan 3, 2016
political theory reading, zmagg's list
View gist:10e2bcd383ae286dbe7e
nationalism & identity:
american foreign policy and its thinkers - perry anderson
Listening to Grasshoppers: Field Notes on Democracy. - arundathi roy
imagined communities -benedict anderson
Reproducing the State, Jacqueline Stevens
imperalism, arendt
general political theory:
18th brumaire, marx
@zmagg
zmagg / gist:ea26038d2b1227141bdc
Created Nov 27, 2015
zmagg's carnitas recipe
View gist:ea26038d2b1227141bdc
I sort of cobble together http://smittenkitchen.com/blog/2011/11/homesick-texan-carnitas/ with http://www.seriouseats.com/2010/07/the-food-lab-how-to-make-crisp-and-juicy-carnitas-without-a-bucket-of-lard.html.
Spices:
Half an orange, juiced.
Orange zest from half an orange.
Lime, cut in halves.
one stick cinnamon, in halves.
teaspoon Arizona Dreaming by Penzeys.
two dried chipotles
teaspoon coriander
You can’t perform that action at this time.