Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Aleksey Leshchuk alekseyl

💭
I may be slow to respond.
View GitHub Profile
@devhero
devhero / ruby threads finish together
Created Jul 2, 2015
Ruby wait for all threads finish
View ruby threads finish together
http://stackoverflow.com/questions/6241384/how-do-i-manage-ruby-threads-so-they-finish-all-their-work
require 'thread'
require 'thwait'
threads = []
threads << Thread.new { }
threads << Thread.new { }
ThreadsWait.all_waits(*threads)
@nlively
nlively / rails_cloc.sh
Created Apr 5, 2012
Count lines of code in a rails project
View rails_cloc.sh
#!/bin/bash
find . \( -iname '*.rb' -o -iname '*.css' -o -iname '*.js' -o -iname '*.erb' -o -iname '*.html' -o -iname '*.haml' -o -iname '*.scss' -o -iname '*.coffee' \) -exec wc -l {} + | sort -n