Skip to content

Instantly share code, notes, and snippets.

View systembell's full-sized avatar

Aaron Bell systembell

View GitHub Profile
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'
@systembell
systembell / jenkins-update-ec2-ami.py
Created August 17, 2020 16:31
jenkins-update-ec2-ami updated for python3
#!/usr/bin/python
import requests
import os
import boto.ec2
import sys
import re
build_url = os.environ['BUILD_URL']
jenkins_base_url = os.environ['JENKINS_URL']
@systembell
systembell / create_instance.rb
Created April 19, 2012 22:03
Create EC2 VPC Instance
#!/usr/bin/env ruby
require 'fog'
require 'trollop'
require 'yaml'
STDOUT.sync = true
@systembell
systembell / keybase.md
Created January 6, 2017 18:52
keybase.md

Keybase proof

I hereby claim:

  • I am systembell on github.
  • I am systembell (https://keybase.io/systembell) on keybase.
  • I have a public key ASAegEd2n-6LV4-4GF54DT3m80dPf-jco6Oncri-alN8Iwo

To claim this, I am signing this object:

@systembell
systembell / wan-up
Last active April 5, 2016 10:10
Selective VPN routing in Tomato
# This code goes in the WAN UP section of the Tomato GUI.
#
# To list the current rules on the router, issue the command:
# iptables -t mangle -L PREROUTING
#
# Flush/reset all the rules to default by issuing the command:
# iptables -t mangle -F PREROUTING
#
#
# First it is necessary to disable Reverse Path Filtering on all
# 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"
@systembell
systembell / create_ebs.rb
Created May 12, 2012 03:12 — forked from lusis/create_ebs.rb
Small script to setup ec2 instances and EBS volumes for my blog post series
# 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
@systembell
systembell / upload_server_certificate.rb
Created April 19, 2012 22:21
Upload IAM Server Certificate
#!/usr/bin/env ruby
require 'fog'
require 'trollop'
STDOUT.sync = true
opts = Trollop::options do
version "#{File.basename($0)} 0.0.1 (c) 2011 Upload IAM Certificate"
#! /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()
@systembell
systembell / gist:1665074
Created January 23, 2012 19:27 — forked from bpoweski/gist:974870
Route53 gem chef recipe
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]