I hereby claim:
- I am dmcclory on github.
- I am dan_promptworks (https://keybase.io/dan_promptworks) on keybase.
- I have a public key whose fingerprint is E3A6 C750 8DCC 2234 D142 ACAE 93EF 1804 FFEF 69AD
To claim this, I am signing this object:
| class Foo | |
| def awesome(x) | |
| y = 50 | |
| x + y | |
| end | |
| end | |
| set_trace_func proc { |event, file, line, id, binding, classname| | |
| # output the binding at the start of any call to Foo#awesome |
I hereby claim:
To claim this, I am signing this object:
| # some real quick code for running requests in parallel | |
| # usage: | |
| # $ ruby parallel_req.rb http://url_place/ post 5 data.json | |
| # doesn't work with get requests (yet)! | |
| require 'http' | |
| url = ARGV[0] | |
| method = ARGV[1] | |
| thread_count = ARGV[2].to_i |
| <html> | |
| <head> | |
| <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script> | |
| </head> | |
| <body> | |
| <h1>Yo a Podcast episode!</h1> | |
| <audio controls src="http://traffic.libsyn.com/ucblongform/Karin_Louise_Hammerberg.mp3" type="audio/mpe | |
| g"> | |
| Your browser does not support the <code>audio</code> element. | |
| </audio> |
| begin | |
| require "bundler/inline" | |
| rescue LoadError => e | |
| $stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
| raise e | |
| end | |
| gemfile(true) do | |
| source "https://rubygems.org" | |
| # Activate the gem you are reporting the issue against. |
| # myapp.rb | |
| require 'sucker_punch' | |
| require 'sinatra/base' | |
| require 'http' | |
| require 'json' | |
| class SimpleCache | |
| attr_reader :data |
| ;; tring out some ideas from David Nolan's talk [The Power of Toys](https://www.youtube.com/watch?v=fgRt0ecWfEE) | |
| ;; 1) a toy language, eg: `{:action :deposit :acc-id "acc-2" :amount 600}` | |
| ;; 2) a model where every function takes in the state of the world & returns an updated state of the world | |
| ;; (the talk is also about using simple property-based testing to generate programs written in the toy language, I haven't tried that) | |
| ;; src/bank-model/core.clj | |
| (ns bank-model.core) | |
| (defn increment-time [world] | |
| (let [updated (+ 1 (get-in world [:time] 0))] |