ruby 1.9.2 + async_sinatra + thin thin start
ab -n 10000 -c 100 http://localhost:3000/
-> 49ms / request
node server.js
Shopify store data widget | |
by Larry Wheeler | |
# Description | |
Widget for [Dashing](http://dashing.io/) that shows data from your Shopify shop. | |
# Usage | |
1. To use this widget, copy `shopify.html`, `shopify.coffee`, and `shopify.scss` into a `/widgets/shopify` directory, and copy the `shopify.rb` file into your `/jobs` folder. | |
2. Create a private app in your store and copy the secret and login. https://docs.shopify.com/api/guides/api-credentials | |
3. Add gem 'shopify_api', :require => 'shopify_api' to your Gemfile 'gem install shopify_api' |
# Usage: | |
# source iterm2.zsh | |
# iTerm2 window/tab color commands | |
# Requires iTerm2 >= Build 1.0.0.20110804 | |
# http://code.google.com/p/iterm2/wiki/ProprietaryEscapeCodes | |
tab-color() { | |
echo -ne "\033]6;1;bg;red;brightness;$1\a" | |
echo -ne "\033]6;1;bg;green;brightness;$2\a" | |
echo -ne "\033]6;1;bg;blue;brightness;$3\a" |
# Create 4 volumes and attach them to hdb | |
%w[sdi sdj sdk sdl].each do |dev| | |
volume = AWS.volumes.new :device => "/dev/#{dev}", :size => 5, :availability_zone => hdb.availability_zone | |
volume.server = hdb | |
volume.save | |
end |
#! /usr/bin/env python | |
import fileinput | |
import argparse | |
from operator import itemgetter | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--target-mb', action = 'store', dest = 'target_mb', default = 61000, type = int) | |
parser.add_argument('vmtouch_output_file', action = 'store', nargs = '+') | |
args = parser.parse_args() |
define :cname_record, :hostname => nil do | |
name = params[:name] | |
hostname = params[:hostname] | |
subdomain = name.split(".").tap(&:shift).join(".") | |
remote_file "/home/#{node[:owner_name]}/.route53" do | |
source "route53.yml" | |
cookbook 'supply_chain_db' | |
owner node[:owner_name] | |
group node[:owner_name] |
# Source accepts the protocol region:// with the host as the bucket | |
# access_key_id and secret_access_key are just that | |
# for the eu-west-1 region: | |
s3_file "/var/bulk/the_file.tar.gz" do | |
source "s3-eu-west-1://your.bucket/the_file.tar.gz" | |
access_key_id your_key | |
secret_access_key your_secret | |
owner "root" | |
group "root" |