This file contains hidden or 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
| # see: | |
| # https://github.com/adammck/rvm | |
| # no env vars are defined: | |
| $ echo $TWITTER_API_KEY | |
| # rvm isn't enabled as default: | |
| $ which ruby | |
| /usr/bin/ruby |
This file contains hidden or 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
| # Temporarily patch the Rails configuration for the duration of a block. | |
| # For example: | |
| # | |
| # test "should create a resque job when background_jobs is true" do | |
| # with_config :background_jobs=>true do | |
| # repo = Repo.create :url=>TEST_CLONE_URL | |
| # assert_queued(CloneJob, [repo.pk]) | |
| # end | |
| # end | |
| # |
This file contains hidden or 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
| Log in and visit: | |
| https://github.com/settings/payments | |
| Then in the console: | |
| $("table#payment-history tr.success td.amount").toArray().reduce(function(a, b) { | |
| var dollars = b.innerHTML.replace(/[^\d\.]/g, ""); | |
| return a + parseFloat(dollars); | |
| }, 0); |
This file contains hidden or 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
| def call_spy | |
| calls = [] | |
| depth = 0 | |
| set_trace_func proc { |event, file, line, id, binding, classname| | |
| if id != :set_trace_func | |
| if (event == "c-call" || event == "call") | |
| indent = " " * (depth * 2) | |
| calls << "#{indent}#{classname}##{id}" | |
| depth += 1 |
This file contains hidden or 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
| FakeWeb.register_uri(:any, %r{^http://(.+?):9200/}, :body=>"", :status=>500) |
This file contains hidden or 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
| 1.9.3-p194 |
This file contains hidden or 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
| source "https://rubygems.org" | |
| gem "sinatra" | |
| gem "sinatra-contrib" | |
| gem "sequel" | |
| gem "sqlite3" | |
| gem "multi_json" | |
| group :development do | |
| gem "shotgun" |
This file contains hidden or 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
| #!/usr/bin/env python | |
| import time | |
| import optparse | |
| import dynamixel | |
| if __name__ == "__main__": | |
| parser = optparse.OptionParser() | |
| parser.add_option("-p", "--port", help="Serial port", default="/dev/tty.usbserial-A9ITPZVR") | |
| parser.add_option("-b", "--baud", help="Baud rate", default="1000000") |
This file contains hidden or 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
| #!/usr/bin/env python | |
| import sys | |
| import time | |
| import optparse | |
| import dynamixel | |
| if __name__ == "__main__": | |
| parser = optparse.OptionParser() | |
| parser.add_option("-p", "--port", help="Serial port", default="/dev/tty.usbserial-A9ITPZVR") |
This file contains hidden or 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
| #!/usr/bin/env python | |
| import time | |
| import random | |
| import optparse | |
| import dynamixel | |
| if __name__ == "__main__": | |
| parser = optparse.OptionParser() | |
| parser.add_option("-p", "--port", help="Serial port", default="/dev/tty.usbserial-A9ITPZVR") |