Last active
August 29, 2015 13:58
-
-
Save ang3lkar/9971571 to your computer and use it in GitHub Desktop.
Various snippets
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
# RUN MULTIPLE SERVERS LOCALLY | |
rails s | |
rails s -p 3001 -P tmp/pids/server2.pid | |
# RUN A SPECIFIC METHOD IN A MINITEST CLASS | |
ruby -Ilib:test test/models/widget_test.rb -n test_refresh | |
# PRETTY LOOP PRINT | |
Encoding.list.each{|enc| | |
begin | |
print "%-10s\t" % [enc] | |
print "\t\xD0".force_encoding(enc) | |
print "\t\xD0".force_encoding(enc).encode('utf-8') | |
rescue => err | |
print "\t#{err}" | |
end | |
print "\n" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment