Skip to content

Instantly share code, notes, and snippets.

Aaron Brady insom

Block or report user

Report or block insom

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
jahfer / active_record_test_logger.rb
Last active Nov 26, 2019
Small tweak to output Active Record logs inside of a test with the stacktrace attached
View active_record_test_logger.rb
module MyLogSubscriber
def sql(*args)
trace = caller
Rails.backtrace_cleaner.add_silencer { |line| not line =~ /^(components)\// }
puts Rails.backtrace_cleaner.clean(trace)
puts "---------------"
audiodude /
Created Nov 7, 2016
Random sentence mangler
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:
SlexAxton / .zshrc
Last active Feb 18, 2020
My gif workflow
View .zshrc
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
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
kr / gist:4013851
Created Nov 4, 2012 — forked from mattetti/gist:3798173
async fetching of urls using goroutines and channels
View gist:4013851
package main
import (
var urls = []string{
carljm / postactivate
Created Jul 12, 2011
Yo dawg, I heard you like Ruby...
View postactivate
# This hook is run after every virtualenv is activated.
export GEM_HOME=$VIRTUAL_ENV/gems/
export GEM_PATH=
export PATH=$VIRTUAL_ENV/gems/bin:$PATH
You can’t perform that action at this time.