- Twitter: @chris_saunders
- Blog: http://christophersaunders.ca
- Company: Shopify http://shopify.com
| class Importer | |
| def import | |
| api_products = ShopifyAPI::Product.find(:all) | |
| ShopProductSink::Product.create_from_resources(api_products) | |
| end | |
| end |
| def request(data, hmac=nil) | |
| options = { | |
| :method => 'POST', | |
| :input => data, | |
| 'X-Shopify-Hmac-SHA256' => hmac || calculate_hmac(data) | |
| } | |
| ActionDispatch::Request.new(Rack::MockRequest.env_for("", options)) | |
| end |
| module Doodle | |
| class Poodle | |
| end | |
| end | |
| module Strudel | |
| module Doodle | |
| class Fancy | |
| def new_poodle |
It was brought to our attention that the integer value type in our metafields API wasn't working the way you'd expect and required weird hacks in liquid such as {{ metafield.value | plus: 0}} to coerce the values back into integers. This was anything but desirable and we wanted to correct this discrepancy. There were some side-effects that came out of this which were accidental.
This change fixes the way the Shopify Metafield API behaves. According to the documentation two value_types are supported, string and integer though the integer value wasn't being respected and was simply just a string.
With the changes that have been deployed; if your field was an set to an integer value_type it will be properly coereced into the data-type you are expecting. Though if you were using the field incorrectly such as storing `"some string dat
If you are on a Mac all you should need to do is:
gem install gosu
To run the game simply:
ruby pawng.rb
You will require 2 png assets:
| scorch() { | |
| ps aux | grep $@ | tr -s ' ' | cut -d ' ' -f 2 | xargs kill | |
| } |
| /Users/csaunders/development/ruby/steam-sauna [git::import_data *] [csaunders@OuterHaven] [13:41] | |
| > bx rails c | |
| Loading development environment (Rails 4.0.3) | |
| irb(main):001:0> require 'benchmark' | |
| => false | |
| irb(main):002:0> games = [201790, 251060, 227600] | |
| => [201790, 251060, 227600] | |
| irb(main):003:0> pipeline = GameImportPipeline.new | |
| => #<GameImportPipeline:0x007ff8de129920> | |
| irb(main):004:0> puts Benchmark.measure { pipeline.import(games) } |
| define :one_up do | |
| use_synth :saw | |
| [:e3, :g3, :e4, :c4, :d4, :g4].each do |n| | |
| play n, release: 0.25 | |
| sleep 0.125 | |
| end | |
| end | |
| define :powerup do | |
| use_synth :saw |
| #!/bin/bash | |
| #run the app to grab a random URL then die | |
| bundle exec ruby app.rb & | |
| PID=$! | |
| sleep 3 | |
| open http://localhost:4567 | |
| sleep 10 | |
| kill $PID |