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
cd ~/code/wdi/WDI_NYC_Apr14_Proto/.git/hooks | |
mv pre-commit pre-commit-temp.sample | |
cd ../.. | |
# Make the file the way they "should" be | |
git add -A | |
git commit -m "git hook hack" | |
cd ~/code/wdi/WDI_NYC_Apr14_Proto/.git/hooks | |
mv pre-commit-temp.sample pre-commit |
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
# Move ALL the files and folders to where they "Should" be BEFORE running this!!! | |
# Copy/Paste this from within the root of the repo: | |
# curl 'https://gist.githubusercontent.com/amadden80/11197738/raw/898d5382af2608c087b5b4dbc0c9aec070c6d39e/gistfile1.sh' | bash | |
mv .git/hooks/pre-commit .git/hooks/pre-commit-temp.sample | |
git add -A | |
git commit -m "pre-hook hack" | |
mv .git/hooks/pre-commit-temp.sample .git/hooks/pre-commit |
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
module MTA | |
def self.set_mta_data | |
cleaned_mta_data = {} | |
lines_name_color.each do |name_color| | |
cleaned_mta_data[name_color[0]] = { | |
name: name_color[0], | |
color: name_color[1], |
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
module MTA | |
def self.set_mta_data | |
cleaned_mta_data = {} | |
lines_name_color.each do |name_color| | |
cleaned_mta_data[name_color[0]] = { | |
name: name_color[0], | |
color: name_color[1], |
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
sudo apt-get -y install ruby-dev | |
sudo apt-get -y install postgresql | |
sudo apt-get -y install postgresql-contrib | |
sudo apt-get -y install libpq-dev | |
sudo apt-get -y install build-essential | |
touch ~/.psql_history | |
sudo -u postgres createuser --superuser $USER |
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
begin | |
require 'CSV' | |
rescue | |
require 'csv' | |
end |
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
// Flamer | |
$('body').on('keydown', function(e){ | |
var key = e.keyCode; | |
if (key==37){ | |
$('button.green').first().click() | |
}else if(key==39){ | |
$('button.red').first().click() | |
} | |
}) |
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
var port = parseInt(process.argv[2]) || 8000; | |
var http = require('http'); | |
var fs = require('fs'); | |
var path = require('path'); | |
http.createServer(function (request, response) { | |
var filePath = request.url; |
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
// Copy Paste into JS console for ANY website... | |
var images = document.getElementsByTagName('img') | |
for (var i = 0; i < images.length; i++) { | |
images[i].src = 'http://andrewmadden.com/pageContent/images/face.png' ; | |
} |
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
require 'socket' | |
server = TCPServer.new 2000 | |
loop do | |
client = server.accept | |
if request = client.gets | |
puts "\n------ request ------" |
OlderNewer