Skip to content

Instantly share code, notes, and snippets.

View cp's full-sized avatar
:shipit:

Colby Aley cp

:shipit:
View GitHub Profile
@cp
cp / email_parser.rb
Created November 19, 2013 04:45
Simple script for taking a CSV of emails and converting it to something Mail.app likes.
require 'csv'
emails = Array.new
text = File.read('emails.csv').gsub(/\\"/,'""')
CSV.parse(text, headers: true, header_converters: :symbol) do |row|
emails << row[:email]
end
puts emails.join(',')
@cp
cp / hlog
Created November 15, 2013 07:35
A simple and dirty parser for Heroku Logplex. Not well tested.
#!/usr/bin/env ruby
# -*- encoding: utf-8 -*-
require 'terminal-table'
require 'json'
#
# USAGE: `ruby log.rb [HEROKU_APP_NAME]`
#
# HAIL RUBY
# My response to https://github.com/JacksonGariety/jesus
# Authentication configured through environment variables, per http://rdoc.info/gems/twitter.
require 'twitter'
require 'teller'
loop do
Twitter.unfollow("JacksonGariety")
@cp
cp / .vimrc
Created October 5, 2013 19:10
syntax on
set tabstop=2
autocmd vimenter * NERDTree
autocmd Vimenter * wincmd p
function! NERDTreeQuit()
redir => buffersoutput
silent buffers
redir END
" 1BufNo 2Mods. 3File 4LineNo
@cp
cp / README.md
Last active December 20, 2015 19:09
Cloudability Shopify Dashboard

Cloudability for Dashing

This is a simple number widget that shows you your current cloud spending for the current month, compared to last month. It is powered by the Cloudability API.

You will need to create and set your Cloudability API key to use this widget. After creating an account, you can obtain an API key here.

Dependencies

This uses the cloudability gem. You will need to add it to your Gemfile and bundle install