Skip to content

Instantly share code, notes, and snippets.

View alekseyl's full-sized avatar
👨‍💻
Looking for a job

Aleksey Leshchuk alekseyl

👨‍💻
Looking for a job
View GitHub Profile
@nlively
nlively / rails_cloc.sh
Created April 5, 2012 19:02
Count lines of code in a rails project
#!/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
@devhero
devhero / ruby threads finish together
Created July 2, 2015 08:51
Ruby wait for all threads finish
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)