Skip to content

Instantly share code, notes, and snippets.

View rypit's full-sized avatar

RJ Pittman rypit

View GitHub Profile
@rypit
rypit / pdftk.rb
Created January 6, 2019 00:17
pdftk homebrew cask
# Brew cask to install pdftk
cask 'pdftk' do
version '2.02'
sha256 'c0679a7a12669480dd298c436b0e4d063966f95ed6a77b98d365bb8c86390d1b'
url 'http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.6-setup.pkg'
name 'pdftk'
pkg 'pdftk_server-2.02-mac_osx-10.6-setup.pkg'
uninstall pkgutil: 'com.pdflabs.pdftkThePdfToolkit.pdftk.pkg'
end
@rypit
rypit / README.md
Last active May 15, 2020 16:09
Github Inbox Zero

Github Inbox Zero

Github Paralysis has met it's match.

2types

Github Paralysis

Symptoms day include but are not limited to:

  • A sense of despair when looking at the amount of Github spam in your inbox
  • Persistent eye-twitch at the blue dot to the left of your name in your Github toolbar
  • An ever-scrolling notifications page that gives you no value whatsoever
@rypit
rypit / gist:08280acfd74175e1ce0aff27b3ce23c5
Created March 1, 2018 18:51
Atom: Replace constraint names in oracle dump files
search: ^(CREATE TABLE \"([A-Z_]*)\"[\s\(]*$)(\n?\r?\s?[A-Z_\"\s\(0-9\,)]*,$)(\n\s?CONSTRAINT ([A-Z_0-9]*))
replace: $1$3\n CONSTRAINT $2_PK
@rypit
rypit / captains_guide.md
Last active September 15, 2017 17:30
Captain's Guide: S.S. Shipit 🚢

Ahoy! 🎉

You're now the Captain of the S.S. Shipit! Through hard work, dedication and sheer engineering brilliance, you have shipped something truly impeccable! By assuming command, you join the prestigious ranks of a long line of Captains before you who have sailed the software seas and stewarded the ship from innovation to innovation along the way.

Captains Guide

The previous captain has entrusted you with the responsibilities of continuing the tradition of those who came before. Luckily, doing so is pretty easy!

1. Keep Your Eyes to the Sea

Be on the lookout for deployments of awesome new features or fixes that stand out! Some bountiful areas to explore might be:

@rypit
rypit / mosaic_and_dc.md
Created February 29, 2016 20:24
Things to check out in DC
@rypit
rypit / travis_history_prune.sh
Created February 25, 2016 02:07
Use the travis gem to create a CSV of data about build history
#!/usr/bin/env ruby
require 'time'
text = `travis --history --date --all`
parsed = text.split("\n").reject{|l| l.match /not yet/}.map do |item|
pattern = /([0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2})\s\#[0-9]*\s([\w]*):\s*([a-z0-9\-\_\.\/]*)/i
this = {
time: DateTime.parse( item.match(pattern)[1] ),
result: item.match(pattern)[2],
branch: item.match(pattern)[3],
app: Dir.pwd.split("/").last,
@rypit
rypit / database.yml
Created November 6, 2015 17:35
Rails Multi-database configuration through ENV
# Reference ENV in YML through ERB.
oracle: &oracle
adapter: oracle_enhanced
username: <%= ENV['ORACLE_DB_USERNAME'] %>
password: <%= ENV['ORACLE_DB_PASSWORD'] %>
database: <%= ENV['ORACLE_DB_DATABASE'] %>_<%= Rails.env %>
mysql: &mysql
adapter: mysql2
@rypit
rypit / mp3player.js
Last active November 4, 2015 02:44
Pure JS MP3 Player: Mostly Acedemic
// You should just use html5 audio and it's api's instead...
// http://www.w3schools.com/html/html5_audio.asp
// ... but this was a fun exercise.
// Useage:
// player = PallotonePlayer.new('http://my-site.com/lol.mp3')
// player.play();
// player.pause();
var PallotonePlayer = function(url) {
@rypit
rypit / idk.rb
Last active August 29, 2015 14:23
Message dispatcher
class YourSubscriber
subscribe(:queue, :or, :something) do |message|
Dispatcher::Base.dispatch_message(message)
end
end
class Dispatcher::Base
def can_process_message?
raise NotImplmenttedError
  • Thing to do
  • another thing
  • and yet another