Skip to content

Instantly share code, notes, and snippets.

View JDStraughan's full-sized avatar

Jason Straughan JDStraughan

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jdstraughan on github.
  • I am jdstraughan (https://keybase.io/jdstraughan) on keybase.
  • I have a public key ASATJsHk9XMWCzbH6oaeX3F2T_KBRzjjHwRoSzDRNe7D1Ao

To claim this, I am signing this object:

@JDStraughan
JDStraughan / codeup-sample-1.js
Created February 15, 2016 16:44
Sample JS function
function isOdd(input) {
var remainder = input % 2;
if (remainder === 0) {
return true;
} else {
return false;
}
}
# Place this into your .bash_aliases and ensure you source the file
# To use, run `gitlog` to get the commits for the past 12 hours
# To get a different time range, run `gitlog 36` for the previous 36 hours
function gitlog() {
if [ -z "$1" ]
then
HOURS=12
else
HOURS=$1
@JDStraughan
JDStraughan / bashrc
Created April 6, 2014 15:17
My .bashrc file
# Add RVM to PATH for scripting
PATH=$PATH:$HOME/.rvm/bin
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
# Add git completion to bash
source ~/git-completion.bash
@JDStraughan
JDStraughan / geekdom-logo-300x300.js
Last active December 14, 2015 17:49
The Geekdom logo in native js. Used this as a reference: http://i.imgur.com/Ya1F7kN.png
// Created by Jason Straughan: JDStraughan.com
// Logo is from Geekdom: http://geekdom.com/
// See this code in action: http://jsfiddle.net/3SSfn/3/
//
// Requries a 300x300 canvas element with id of 'logo'
var canvas = document.getElementById("logo");
var context = canvas.getContext("2d");
var logo = {
@JDStraughan
JDStraughan / clripper.rb
Last active December 10, 2015 12:58
Harvest job postings from all USA CraigsList boards for given areas (default is software, web, and internet engineering)
#!/usr/bin/env ruby
require 'rubygems'
require 'feedzirra'
require 'csv'
cities = %w[abilene akroncanton albany albanyga albuquerque altoona amarillo ames anchorage annarbor annapolis appleton asheville ashtabula athensga athensohio atlanta auburn augusta austin bakersfield baltimore batonrouge battlecreek beaumont bellingham bemidji bend billings binghamton bham bismarck bloomington bn boise boone boston boulder bgky bozeman brainerd brownsville brunswick buffalo butte capecod catskills cedarrapids cnj cenla centralmich chambana charleston charlestonwv charlotte charlottesville chattanooga chautauqua chicago chico chillicothe cincinnati clarksville cleveland clovis collegestation cosprings columbiamo columbia columbus columbusga cookeville corpuschristi corvallis chambersburg dallas danville dayton daytona decatur nacogdoches delrio delaware denver desmoines detroit dothan dubuque duluth eastidaho eastoregon eastco newlondon eastnc eastky martinsburg easternshore eauclaire elpaso elko elmira erie eugene ev
@JDStraughan
JDStraughan / bash_profile
Last active January 9, 2018 09:45
My bash profile with git branch highlighting in prompt
#
# System-wide .profile for sh(1)
#
# Environment Definitions
EDITOR=/usr/bin/nano
# aliases
alias ll="ls -lha"
alias opwd="echo $OLDPWD"