Skip to content

Instantly share code, notes, and snippets.

View Dispader's full-sized avatar
:electron:
Present Company Excluded, LLC

Jake Gage Dispader

:electron:
Present Company Excluded, LLC
View GitHub Profile
@Dispader
Dispader / webapps-ent
Created January 24, 2014 23:41
new webapps-ent start script
#!/bin/bash
# Source function library.
. /etc/rc.d/init.d/functions
silo=`basename $0`
apphome="/swadm"
RETVAL=0
start_tomcat() {
@Dispader
Dispader / quote.txt
Created January 26, 2014 00:22
test of the Sublime Gist plugin
"This is the Picture." ­— Peter Gabriel
"[h]ourWorkIsNeverOver" — Daft Punk
@Dispader
Dispader / .bashrc
Created February 12, 2014 18:00
some personally convenient .bashrc entries
##
## Here There Be Tygers
##
# "The less effort, the faster and more powerful you will be." —Bruce Lee
#
LESS="--no-init --quit-if-one-screen --LONG-PROMPT"
alias ls='ls --color=always'
alias lh='ls --color=always -lasth | less -R'
@Dispader
Dispader / github-talk-extras.md
Created February 26, 2014 16:51
"extras" from a talk on GitHub
def score(dice)
score = 0
roll_count = dice.inject(Hash.new(0)) { |roll, count|
roll[count] += 1; roll
}
roll_count.each { |roll, count|
if count >= 3
@Dispader
Dispader / output.rb
Created April 27, 2014 21:04
error while attempting to add networking to .kitchen.yml
(~/Development/exploratio/chef/test-jenkins-ci-testkichen) master {dispader}04:00pm] bundle exec kitchen list
/home/jake/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/test-kitchen-1.2.1/lib/kitchen/data_munger.rb:109:in `convert_legacy_driver_format_at!': undefined method `rmerge' for nil:NilClass (NoMethodError)
from /home/jake/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/test-kitchen-1.2.1/lib/kitchen/data_munger.rb:98:in `block in convert_legacy_driver_format!'
from /home/jake/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/test-kitchen-1.2.1/lib/kitchen/data_munger.rb:97:in `each'
from /home/jake/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/test-kitchen-1.2.1/lib/kitchen/data_munger.rb:97:in `convert_legacy_driver_format!'
from /home/jake/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/test-kitchen-1.2.1/lib/kitchen/data_munger.rb:35:in `initialize'
from /home/jake/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/test-kitchen-1.2.1/lib/kitchen/config.rb:78:in `new'
fro
class DiceSet
attr_accessor :values
def roll(dice)
self.values = []
dice.times { self.values << ( 1 + rand(6) ) }
end
end
@Dispader
Dispader / proxy.rb
Last active August 29, 2015 14:01
final
class Proxy
attr_reader :messages
def initialize(target_object)
@object = target_object
@messages = []
end
def called?(name)
import numpy
import pandas
import statsmodels.api as sm
def custom_heuristic(file_path):
'''
You are given a list of Titantic passengers and their associating
information. More information about the data can be seen at the link below:
http://www.kaggle.com/c/titanic-gettingStarted/data
@Dispader
Dispader / .bashrc-exerpt
Created June 10, 2014 19:31
git prompt
# "Hide in your shell, 'cause the world is out to bleed you for a ride." —Roger Hodgson
#
# ${BEAT} is undefined, so we can pretend to read this.
#
if [ "$USER" != "root" ]; then
export PS1='\[\033[1;37m\](\w)\[\033[0m\]${BEAT}\[\033[4m\]$(__git_ps1 " %s ")\[\033[0m\]${BEAT}\[\033[36m\]{\h}\[\033[0m\]${BEAT}\[\033[7m\]\D{%I:%M%P}\[\033[0m\]${BEAT}] ';
fi
if [ "$USER" == "root" ]; then
export PS1="\[\033[1;37m\](\w)\[\033[0m\]${BEAT}\[\033[36m\]{\h}\[\033[0m\]${BEAT}\[\033[7m\]\D{%I:%M%P}\[\033[0m\]${BEAT}# ";
fi