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
var vm = require('vm'), | |
code = 'var square = n * n;', | |
fn = new Function('n', code), | |
script = vm.createScript(code), | |
sandbox; | |
n = 5; | |
sandbox = { n: n }; | |
benchmark = function(title, funk) { |
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
# http://forums.shopify.com/categories/6/posts/42926 | |
# This is a fairly simple mechanize script to create a few hundred or so shopify discounts from a CSV of groupon codes. | |
# You'll want to change all of the "changeme" values to your own. | |
# The script expects there to be a groupon_codes.csv in the same directory. | |
# | |
# The groupons_code.csv should look like this: | |
# 8m7677 | |
# 8m6749 | |
# 8m5398 | |
# 8m7699 |