Skip to content

Instantly share code, notes, and snippets.

Scott Stout skout23

View GitHub Profile
@skout23
skout23 / notsecret.rb
Created Jun 16, 2014
silly base64decode(rot13()) for when I post bday stuff on friends fb
View notsecret.rb
#!/usr/bin/env ruby
# silly base64decode(rot13())
require 'base64'
string = "VW5jY2wgT3ZlZ3VxbmwgTnkh"
plain = Base64.decode64(string).to_s.tr 'A-Za-z','N-ZA-Mn-za-m'
puts plain
View keybase.md

Keybase proof

I hereby claim:

  • I am skout23 on github.
  • I am skout23 (https://keybase.io/skout23) on keybase.
  • I have a public key ASDw8P2ph2XFQLlCW0GtGhnuJZlOBN6nQMSmPzXH_VPlYAo

To claim this, I am signing this object:

View .tmux.conf
# act like GNU screen
unbind C-b
set -g prefix C-a
# look good
set -g default-terminal "screen-256color"
# Allows for faster key repetition
set -s escape-time 0
View avg_student_count.rb
require 'json'
require 'rest-client'
=begin
{"data"=>
{"district"=>"4fd43cc56d11340000000005",
"school"=>"4fee004cca2e43cf27000002",
"name"=>"Advanced Literature 1(B)",
"teacher"=>"4fee004dca2e43cf270007e8",
@skout23
skout23 / manage_snapshots.rb
Last active Oct 6, 2015
AWS ec2 EBS snapshot management
View manage_snapshots.rb
#!/usr/bin/env ruby
# cleaned up a bit, makes use of memoize to better handle queries to the EC2 backend, less calls == faster.
require 'rubygems'
require 'aws-sdk'
regions = [
"ec2.us-east-1.amazonaws.com",
@skout23
skout23 / tzgeoip.rb
Created Mar 9, 2012
simple silly daemon to set the tz based on current geoip osx only atm, but easy enough to switch up for other os's
View tzgeoip.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'geoip'
# install rubygems and geoip gem
# grab geoip db before
#
# wget -N -q http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
# gunzip GeoLiteCity.dat.gz in same folder as this script
You can’t perform that action at this time.