Skip to content

Instantly share code, notes, and snippets.

View pyro2927's full-sized avatar
๐Ÿ’ญ
I may be slow to respond.

Joseph Pintozzi pyro2927

๐Ÿ’ญ
I may be slow to respond.
View GitHub Profile
var listModelGraph = attrs.listModel.split('.');
$scope.valueArray = _.reduce(listModelGraph, function (scope, node) { return scope[node]; }, $scope);
@pyro2927
pyro2927 / plex-proxy.pac
Created March 4, 2014 13:45
PAC file to automatically configure your proxy
function FindProxyForURL(url, host) {
PROXY = "PROXY 127.0.0.1:8080; DIRECT"
// plex.tv via proxy
if (shExpMatch(host,"*.plex.tv")) {
return PROXY;
}
// Everything else directly!
return "DIRECT";
}
@pyro2927
pyro2927 / wheel_of_fortune.coffee
Last active December 31, 2015 13:19
Wheel of Fortune spinner for Hubot
# Description:
# Made so we can play Wheel of Fortune in Campfire
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
@pyro2927
pyro2927 / gtranslate.rb
Created November 13, 2013 17:43
Copy down Google Translations into COUNTRYCODE.lproj/Localizable.strings
require "google_drive"
session = GoogleDrive.login("EMAIL_ADDRESS", "PASSWORD")
# Document key is the value found for the key param in the url
# ex: https://docs.google.com/spreadsheet/ccc?key=0Atoge9gLkMCTdHdza2FxTDliakNGamRXV01WYmNUUVE&usp=drive_web
# has a key of 0Atoge9gLkMCTdHdza2FxTDliakNGamRXV01WYmNUUVE
ws = session.spreadsheet_by_key("DOCUMENT_KEY").worksheets[0]
word_indexes = (3..8) # the rows in which your translated words exist
@pyro2927
pyro2927 / config.fish
Created November 11, 2013 22:24
Fish config
set -U EDITOR vim
set NODE_PATH "/usr/local/lib/node_modules"
set PATH "$EC2_HOME/bin" $PATH
set PATH ".bundle/bin" $PATH
set PATH "/usr/local/bin" $PATH
set PATH "/usr/local/sbin" $PATH
set PATH "/usr/local/share/npm/bin" $PATH
set PATH $HOME/.rbenv/bin $PATH
set PATH $HOME/.rbenv/shims $PATH
@pyro2927
pyro2927 / earliest_user.rb
Created October 24, 2013 21:14
Figure out who has the lowest Github ID in your organization!
require "github_api"
Github.new.orgs.members.list("ORG_NAME").body.sort_by! {|u| u.id} .first.login
@pyro2927
pyro2927 / toc.rb
Last active December 25, 2015 16:59
Generate table of contents from Markdown file
#!/usr/bin/env ruby
# sanity checks
if ARGV.count == 0
puts "You must provide a file name"
return
elsif File.exist?(ARGV.first) == false
puts "That file doesn't exist"
return
end
@pyro2927
pyro2927 / snes9x.cfg
Created October 13, 2013 04:41
Config file used for X-Arcade 2player joystick as well as external USB SNES controller
[Keyboard]
# Get codes from /usr/include/SDL/SDL_keysym.h
A_1=99
B_1=53
X_1=304
Y_1=122
L_1=306
R_1=308
START_1=49
SELECT_1=51
@pyro2927
pyro2927 / fba2x.cfg
Last active December 25, 2015 09:59
Final Burn Alpha (pifba) config to use with the X-Arcade 2player joystick Config follows this layout: https://dl.dropboxusercontent.com/s/1gh4g98j5zyi6t9/2013-10-12%20at%2010.22%20PM%202x.png
[Keyboard]
# Get codes from /usr/include/SDL/SDL_keysym.h
A_1=99
B_1=53
X_1=304
Y_1=122
L_1=306
R_1=308
START_1=49
SELECT_1=51
@pyro2927
pyro2927 / gravatar_gource.rb
Last active December 20, 2015 02:29
Ruby script to load Gravatars for git repo and produce gource video
#!/usr/bin/env ruby
# Run script from inside git repo
# Paths setup for OS X
# requires gource and ffmpeg
# On OS X:
# brew install ffmpeg gource
# Written by: Joe Pintozzi
#
# Resources
# gource: https://code.google.com/p/gource/