- Alabama
- Alaska
- Arizona
- Arkansas
- California
- Colorado
- Connecticut
- Delaware
- Florida
- Georgia
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
#!/usr/bin/env ruby | |
require 'active_support/time' | |
require 'digest' | |
API_KEY = 'YOUR KEY' | |
API_SECRET = 'YOUR SECRET' | |
args = { | |
'from_date' => Date.new(2014,9,1).iso8601, |
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
Host buildserver # bastion | |
HostName 50.123.123.123 | |
User ec2-user | |
ForwardAgent yes | |
IdentityFile /Users/dliggat/.ssh/key.pem | |
Host buildagent # tunnel ssh through a bastion | |
HostName 10.0.0.100 | |
User ec2-user | |
IdentityFile /Users/dliggat/.ssh/key.pem |
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
#!/bin/bash | |
# the_fastas=`ls fastas | sort --reverse` | |
the_fastas=`ls fastas` | |
total=0 | |
for file in $the_fastas; do | |
size=`cat "fastas/$file" | grep -v '>' | tr -d "\n" | wc -c` | |
echo "The file is $file with a size of $size" | |
total=$((total+size)) | |
done |
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
class Parenty | |
class_attribute :foo | |
self.foo = 123 | |
def self.printy | |
"Hello #{self.foo}" | |
end | |
end | |
class Childy < Parenty |
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
#!/usr/bin/env ruby | |
require 'optparse' | |
def parse_options | |
options = { } | |
OptionParser.new { |opts| | |
opts.banner = "Usage: #{__FILE__} --group-size G --trial-count T" | |
opts.on('-g', '--group-size size', 'Size of the group') { |v| options[:group_size] = v } | |
opts.on('-t', '--trial-count count', 'How many trials to run') { |v| options[:trial_count] = v } |
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
#!/usr/bin/env ruby | |
length = 6 | |
chars = [ 'a'..'z', 'A'..'Z', 0..9 ].map(&:to_a).flatten | |
sequencer = chars.repeated_permutation length | |
loop { puts sequencer.next.join '' } |
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
# A consistent title for 'paperless' documents. | |
# Usage: | |
# $ title Apple ipod Receipt | |
# $ [2013-07-08 => apple ipod receipt] copied to clipboard. | |
# Then paste directly into Evernote, etc. | |
function title { | |
title_str=`date '+%Y-%m-%d'` | |
title_str="$title_str =>" | |
while [ $1 ] | |
do |
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
0 * * * * echo `date` Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam diam elit, pellentesque eget mattis vitae, sodales quis quam. Aenean et bibendum felis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Quisque sed metus odio. Cras fermentum tincidunt gravida. Nullam tincidunt, quam at pretium adipiscing, leo lacus condimentum lorem, vitae euismod nisi erat ut dui. Pellentesque malesuada elementum nisl ut sagittis. Nulla sit amet odio leo. Phasellus consectetur lorem sed justo mattis cursus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. >> /tmp/foobar |
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
namespace :production do | |
task sync: :environment do |t, args| | |
user_at_host = 'ubuntu@aws-host.com' | |
user_keypair = '-i ~/.ec2/gsg-keypair' | |
filename = Time.now.strftime "production_dump_%Y-%m-%d_%H-%M-%S.psql" | |
dump_path = "/tmp/#{filename}" | |
project = 'project' | |
# Dumping the table (excluding schema_migrations) on the server. | |
dump_command = ["pg_dump --exclude-table=schema_migrations", |
NewerOlder