Skip to content

Instantly share code, notes, and snippets.

if [[ "$1" == "y" ]]; then
echo -n "Enter github.com username>";
read username;
echo "$username"
fi;
Ebay 96 case 1: 1990s/2000s Rock/Metal Collection
The Mars Volta\De-Loused in the Comatorium
Cave In\Jupiter
Jimmy Eat World\Bleed American
Spawn\The Album
Nirvana\Nevermind
Stone Temple Pilots\Shangri La Dee Da
Queens of the stone age\Songs for the Deaf
@davidrenne
davidrenne / install_robomongo.sh
Created September 20, 2016 12:42 — forked from sanderhouttekier/install_robomongo.sh
This file installs robomongo on your ubuntu / mint linux install
#!/bin/bash -e
# Script for installing Robomongo on Ubuntu.
# Copyright 2013 Binary Birch Tree
# http://www.binarybirchtree.com
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
@davidrenne
davidrenne / oh_hell.py
Last active May 15, 2016 21:24 — forked from usrlocalben/oh_hell.py
"oh hell!" card game logic
"""
"oh hell!" card game logic
(aka contract whilst)
benjamin yates & dave renne, 2016
renne house rules edition
"""
import sys
import random
from itertools import chain
tcpdump -s 100 -n -X host rrcs-71-40-167-210.se.biz.rr.com and port 80
@davidrenne
davidrenne / gist:6453471
Created September 5, 2013 17:38
Default git settings
git config --global user.name "David Renne"
git config --global user.email david_renne@yahoo.com
git config --global push.default current
@davidrenne
davidrenne / gist:5124199
Created March 9, 2013 13:42
db connection php script
CREATE TABLE IF NOT EXISTS `database_connections` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`connection_id` int(11) NOT NULL,
`queries` text NOT NULL,
`page` varchar(300) NOT NULL,
`ip_address` varchar(255) NOT NULL,
`t_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `connection_unique` (`connection_id`),
KEY `connection_id` (`connection_id`)
@davidrenne
davidrenne / gist:4475557
Created January 7, 2013 14:59
log all queries to file in ruby/rails
connection = ActiveRecord::Base.connection
class << connection
alias :original_exec :execute
def execute(sql, *name)
# try to log sql command but ignore any errors that occur in this block
# we log before executing, in case the execution raises an error
begin
file = File.open(Rails.root + "/log/database.log",'a'){|f| f.puts Time.now.to_s+": "+sql}
rescue Exception => e
;
@davidrenne
davidrenne / gist:4470085
Created January 6, 2013 20:41
Get the name of the application in rails
Rails.application.class.parent_name.constantize
var jsdom = require("jsdom").jsdom;
var document = jsdom('<!doctype html>' +
'<html>' +
' <head>' +
' <meta charset="utf-8" />' +
'<title>image triangulation experiment</title>' +
'<link rel="stylesheet" href="styles/main.css" />' +
'</head>' +
'<body data-defaultimage="lincoln.jpg">' +
' <div class="nav-wrapper dark-bg">' +