Skip to content

Instantly share code, notes, and snippets.

View bostonaholic's full-sized avatar
🏕️

Matthew Boston bostonaholic

🏕️
View GitHub Profile
@bostonaholic
bostonaholic / Recipes.md
Created July 11, 2014 03:35
Here are some of my most requested recipes

Recipes

Cast Iron Chicken

Ingredients

  • Bone-in Chicken (thighs, quarters, etc.)
  • Spices
  • Well-seasoned cast iron
@bostonaholic
bostonaholic / gist:cef5a4916d46782ed368
Last active August 29, 2015 14:08
Top 10 Clojure Features Requested in 2014
@bostonaholic
bostonaholic / iota.clj
Created January 26, 2011 23:10 — forked from fogus/iota.clj
iota clojure
(defn iota [t nxt stop y]
(take-while stop (iterate #(t (nxt %)) y)))
(def upto
(fn [start end]
(iota identity inc #(< % end) start)))
(def downto
(fn [start end]
(iota identity dec #(> % end) start)))
@bostonaholic
bostonaholic / Rakefile
Created February 10, 2011 02:48
Rakefile for installing leiningen on OSX
require 'rake'
task :default => [:lein]
desc "download leiningen script and create symbolic link to /usr/local/bin/lein"
task :lein do
leiningen
end
def curl_leiningen(source_file)
@bostonaholic
bostonaholic / ToMetaOrNotToMeta.groovy
Created June 17, 2011 02:47
meta programming in groovy
def isDetailCancellableWithDelegate = {
delegate.status != "INVOICED" || billingService.isCancellable(delegate.invoice)
}
def theMetaProgrammingWay = {
def listOfObjects = detailService.findAll()
listOfObjects.each {
it.metaClass.isCancellable = isDetailCancellableWithDelegate
}
@bostonaholic
bostonaholic / RECEIVE_REFUND.bas
Created November 17, 2011 21:26
how to receive a refund, basically
000 SUB RECEIVE_REFUND
010 ASK POLITELY
020 IF REFUND = "YES" THEN
030 GOTO GOODBYE
040 ELSE
050 GOTO ASK_STERNLY
060 END IF
070 ASK_STERNLY:
080 ASK STERNLY
090 IF REFUND = "YES" THEN
@bostonaholic
bostonaholic / gist:1435918
Created December 5, 2011 23:35
Actual LinkedIn message from a recruiter
Matthew
If you are interested in the following role, please contact me as soon as possible. If you aren't interested perhaps you could refer someone who might be interested
Senior Grails on Rails / Groovy on Grails Developer
This is a 6 to 12 month consulting position that can also possibly lead to a permanent position, and is located in Atlanta, Georgia.
Our Client is just starting with Groovy in their environment, and they need someone who not only is hands-on, but who also can lead/mentor others on their team with the technology.
@bostonaholic
bostonaholic / ruby koans watchr file
Created January 4, 2012 14:11 — forked from daniely/ruby koans watchr file
Super simple watchr for ruby koans
watch('koans/(.*)\.rb') { system "rake" }
@bostonaholic
bostonaholic / protip.el
Created March 23, 2012 20:17
#emacs #protip: buffer-file-name is nil when not viewing a file
;; I wanted to setup a hook which would compile the user init file upon exit or save.
;; So I wrote the code below to do so:
(defun my-emacs-lisp-mode-hook ()
(when (files-equal-p buffer-file-name user-init-file)
(add-hook 'after-save-hook 'byte-compile-user-init-file t t)))
(add-hook 'emacs-lisp-mode-hook 'my-emacs-lisp-mode-hook)
(add-hook 'kill-emacs-hook 'byte-compile-user-init-file t t)
@bostonaholic
bostonaholic / gist:3165579
Created July 23, 2012 19:15
Fixing Twitter Bootstrap append/prepend with HAML

I was having issues with the append/prepend of twitter bootstrap. When writing my forms in haml, there would be a space between the input and the prepended text/icon. Here was my original code:

.field
  = f.label :twitter
  .input-prepend
    %span.add-on @
    = f.text_field :twitter