Skip to content

Instantly share code, notes, and snippets.

View jrob00's full-sized avatar

Jason Roberts jrob00

  • Simi Valley, CA
View GitHub Profile
@jrob00
jrob00 / gist:887748
Created March 25, 2011 22:15
Generating an Apache Self-Signed Cert
openssl req -x509 -newkey rsa:1024 -keyout server.key -out server.crt -days 9999 -nodes
chown root:root server.key
chmod 400 server.key
@jrob00
jrob00 / gist:1230741
Created September 20, 2011 23:37
Change Mac OSx default screenshot directory
$ mkdir Dropbox/Screenshots
$ defaults write com.apple.screencapture location Dropbox/Screenshots
@jrob00
jrob00 / gist:1263740
Created October 5, 2011 05:44
jQuery Plugin Template
/*
* jquery.pluginTemplate.js
*
*/
(function( $ ){
$.fn.pluginName = function(options) {
// there's no need to do $(this) because
// "this" is already a jquery object
@jrob00
jrob00 / gist:1350507
Created November 9, 2011 05:29
Installing RVM, Ruby, Heroku, Homebrew, Node.js, NPM
http://devcenter.heroku.com/articles/quickstart
http://martinciu.com/2011/11/deploying-hubot-to-heroku-like-a-boss.html
1. install RVM: https://rvm.beginrescueend.com/
2. install Ruby: rvm install 1.9.2 && rvm use 1.9.2 --default
3. install Heroku: sudo gem install heroku
4. install Homebrew: https://github.com/mxcl/homebrew/wiki/Installation
@jrob00
jrob00 / github_post_recieve.php
Created November 29, 2011 17:33 — forked from cowboy/github_post_recieve.php
GitHub PHP webhook to auto-pull on repo push
<?php
// Use in the "Post-Receive URLs" section of your GitHub repo.
if ( $_POST['payload'] ) {
shell_exec( 'cd /srv/www/git-repo/ && git reset --hard HEAD && git pull' );
}
?>hi
@jrob00
jrob00 / gist:1411621
Created November 30, 2011 22:56
dnsmasq stuff
http://davesouth.org/stories/how-to-set-up-dnsmasq-on-snow-leopard-for-local-wildcard-domains
http://inspirix.wikispaces.com/dnsmasq-on-OSX
- Can I install dnsmasq w/homebrew instead of macports?
- What exactly are those 2 and how are they different?
- Can (do I want to) I have them installed simultaneously?
@jrob00
jrob00 / README.md
Created December 9, 2011 18:35 — forked from mbostock/.block
How-To: Update a Pie Chart (Part 2)

Click to change datasets.

Previous: Part 1.

@jrob00
jrob00 / gist:1556003
Created January 3, 2012 17:40
Using MSSQL to strtodate date ranges
DECLARE @StartDate DATETIME, @EndDate DATETIME
SELECT
@StartDate =
CASE WHEN 'Today' THEN CAST(FLOOR(CAST(GetDate() AS FLOAT)) AS DATETIME)
CASE WHEN 'This Week' THEN DATEADD(dd, -1 * (DATEPART(dw, GETDATE()) - 1), CAST(FLOOR(CAST(GETDATE() AS FLOAT)) AS DATETIME))
CASE WHEN 'ThisMonth' THEN DATEADD(dd, -1 * (DATEPART(d, GETDATE()) - 1), CAST(FLOOR(CAST(GETDATE() AS FLOAT)) AS DATETIME))
ELSE '1/1/1900'
END
@jrob00
jrob00 / dabblet.css
Created February 3, 2012 00:25
Donation Center Pattern Library
/**
* Donation Center Pattern Library
*/
ul {
list-style: none;
overflow: auto;
}
li {
@jrob00
jrob00 / dabblet.css
Created February 16, 2012 23:52
Donation Center Color Pattern Library
/**
* Donation Center Color Pattern Library
*/
body {
background-color: #FBFBFB;
color: #7B7B7B;
}
ul {
list-style: none;