Scaling Magento presentation with 60 slides and notes, which was then reviewed by Alan Storm.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This hook is run after every virtualenv is activated. | |
export OLD_GEM_HOME=$GEM_HOME | |
export GEM_HOME=$VIRTUAL_ENV/gems/ | |
export GEM_PATH= | |
export PATH=$VIRTUAL_ENV/gems/bin:$PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gifify() { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
fi | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import nltk | |
import random | |
STOP_WORDS = ['the', 'a', 'and', 'of', 'in', 'with', 'for', 'on'] | |
def rhyme(inp, level): | |
entries = nltk.corpus.cmudict.entries() | |
syllables = [(word, syl) for word, syl in entries if word == inp] | |
rhymes = [] | |
for (word, syllable) in syllables: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module MyLogSubscriber | |
def sql(*args) | |
trace = caller | |
Rails.backtrace_cleaner.remove_silencers! | |
Rails.backtrace_cleaner.add_silencer { |line| not line =~ /^(components)\// } | |
puts Rails.backtrace_cleaner.clean(trace) | |
super | |
puts "---------------" | |
end | |
end |