Skip to content

Instantly share code, notes, and snippets.

View djhaskin987's full-sized avatar

Daniel Jay Haskin djhaskin987

View GitHub Profile
@djhaskin987
djhaskin987 / fpm_jar.sh
Last active August 29, 2015 14:02 — forked from anonymous/gist:5c7c5134ec049b277615
Create an #FPM jar using #JRuby and #Warbler
#!/bin/sh
# Main idea largely taken from http://stackoverflow.com/a/8410010/850326
prefix="${HOME}/Software" # Another viable option: /opt/
wget http://jruby.org.s3.amazonaws.com/downloads/1.7.12/jruby-bin-1.7.12.zip
unzip jruby-bin-1.7.12.zip
mkdir -p "${prefix}"
mv jruby-1.7.12 "${prefix}"
export PATH="${PATH}:${prefix}/jruby-1.17.12"
@djhaskin987
djhaskin987 / debian.md
Created August 27, 2014 15:13
debian install scripts explained

Possible first-hack at the debian scripts for install-upgrade-configure: preinst

if [ "${1}" = "install" -a -z "${1}" ]
then
    # "before install" goes here
elif [ "${1}" = "upgrade" -a -n "${2}" ]
then
    upgradeVersion="${2}"
    # "before upgrade" goes here
;; Big thanks to Christophe Grand - https://groups.google.com/d/msg/clojure/L1GiqSyQVVg/m-WJogaqU8sJ
(defn scaffold [iface]
(doseq [[iface methods] (->> iface .getMethods
(map #(vector (.getName (.getDeclaringClass %))
(symbol (.getName %))
(count (.getParameterTypes %))))
(group-by first))]
(println (str " " iface))
(doseq [[_ name argcount] methods]
(println
@djhaskin987
djhaskin987 / keybase.md
Created April 15, 2015 15:23
keybase.md

Keybase proof

I hereby claim:

  • I am djhaskin987 on github.
  • I am djhaskin987 (https://keybase.io/djhaskin987) on keybase.
  • I have a public key whose fingerprint is F54C FF73 1E7E 01C3 AE74 9B30 D62D AA3E 080E 17A9

To claim this, I am signing this object:

@djhaskin987
djhaskin987 / us_letter.tex
Last active August 29, 2015 14:27
US letter LaTeX template for math and science
\documentclass[12pt]{article}
\usepackage{amsmath,amsfonts,amssymb,amsthm,placeins}
\usepackage[pdftex]{graphicx}
\setlength{\pdfpagewidth}{8.5in}
\setlength{\pdfpageheight}{11in}
\setlength{\topmargin}{0.0in}
\setlength{\voffset}{0.0in}
\setlength{\oddsidemargin}{0.0in}
@djhaskin987
djhaskin987 / git-open.py
Created August 21, 2015 02:34
Clone a git repo in an organized, convenient fashion
#!/usr/bin/python
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import giturlparse
import os
import subprocess
import argparse
@djhaskin987
djhaskin987 / Testing
Created May 18, 2012 19:18
Gist_Sample.muse
This is a Gist File.
25 years of my life and STILL
@djhaskin987
djhaskin987 / .config_git-cola_settings
Last active November 9, 2015 14:50
My favorite git-cola layout
{
"gui_state": {
"mainview": {
"lock_layout": false,
"show_status_filter": false,
"height": 768,
"windowstate": "AAAA/wAAAAL9AAAAAQAAAAAAAASaAAADVfwCAAAAAfwAAAAVAAADVQAAATsA/////AEAAAAC/AAAAAAAAADZAAAA2QD////6AAAAAAIAAAAC+wAAAAwAUgBlAGMAZQBuAHQBAAAAAP////8AAABjAP////sAAAASAEYAYQB2AG8AcgBpAHQAZQBzAQAAAHsAAADRAAAAYwD////8AAAA3AAAA74AAACZAP////wCAAAABPsAAAAOAEEAYwB0AGkAbwBuAHMBAAAAFQAAAGYAAAA6AP////wAAAB+AAAAvQAAAHgBAAAU+gAAAAEBAAAAA/sAAAAMAFMAdABhAHQAdQBzAQAAAAD/////AAAAiQD////7AAAACABEAGkAZgBmAQAAAAD/////AAAAewD////7AAAADABDAG8AbQBtAGkAdAEAAAFgAAABnwAAAJkA////+wAAAA4AQgByAG8AdwBzAGUAcgEAAAE+AAABBwAAAGMA////+wAAAA4AQwBvAG4AcwBvAGwAZQEAAAJIAAABIgAAAB0A////AAAAAAAAA1UAAAAEAAAABAAAAAgAAAAI/AAAAAA=",
"width": 1024,
"maximized": false,
"y": 50,
@djhaskin987
djhaskin987 / Masterless RPM or DEB Puppet Module Files List
Last active December 21, 2015 11:58 — forked from jordansissel/site.pp
A suggested layout for an RPM or a DEB package which installs a masterless puppet module named 'foo'.
/usr/share/puppet/modules/foo
/usr/share/puppet/modules/foo/manifests
/usr/share/puppet/modules/foo/manifests/init.pp
/usr/share/puppet/modules/foo/files
/usr/share/puppet/modules/foo/files/hello
/usr/share/puppet/masterless/foo.pp
@djhaskin987
djhaskin987 / document.tex
Created September 11, 2013 20:55
A sample latex document that can be used as a template for general latex usage.
\documentclass[12pt]{article}
\usepackage{amsmath,amsfonts,amssymb,amsthm}
\usepackage[pdftex]{graphicx}
\setlength{\pdfpagewidth}{8.5in}
\setlength{\pdfpageheight}{11in}
\setlength{\topmargin}{0.0in}
\setlength{\voffset}{0.0in}
\setlength{\headheight}{0.0in}