Skip to content

Instantly share code, notes, and snippets.

Joshua Miller joshuamiller

Block or report user

Report or block joshuamiller

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile


Food Carts

  • SE 28th & Ankeny
    • Wolf & Bear's (Israeli)
    • Le Pantry (upscale but not expensive)
    • Captured Beer Bus (Oregon beer, cider, wine on tap)
  • SE 12th & Hawthorne (Cartopia)
    • Chicken & Guns (incredible Latin rotisserie chicken)
View flavor.rb
# encoding: US-ASCII
# Convert a Markdown README to HTML with Github Flavored Markdown
# Github and Pygments styles are included in the output
# Requirements: json gem (`gem install json`)
# Input: STDIN or filename
# Output: STDOUT
# Arguments: "-c" to copy to clipboard (or "| pbcopy"), or "> filename.html" to output to a file
View gist:8322930
julia> reports["Lat"]
1130-element DataArray{Float64,1}:
View rails4-rc1-routes.rb
# config/routes.rb
get '/sign_in' => 'user_sessions#new', :as => :sign_in
post '/sign_in' => 'user_sessions#create', :as => :sign_in
# Output
#=> Invalid route name, already in use: 'sign_in'
#=> You may have defined two routes with the same name using the `:as` option, or you may be overriding a route already defined by a resource with the same naming. For the latter, you can restrict the routes created with `resources` as explained here:
View 0001-Ensure-runtime-exists-before-building-runtime-platfo.patch
From 6d442e38286fa6c3a3ca9e355ee532c87cee1a90 Mon Sep 17 00:00:00 2001
From: Joshua Miller <>
Date: Tue, 31 May 2011 22:16:35 -0400
Subject: [PATCH] Ensure runtime/ exists before building runtime/platform.conf
rakelib/platform.rake | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/rakelib/platform.rake b/rakelib/platform.rake
View 0001-Add-and-casecmp-to-Symbol.patch
From 6255dd5f7263624e36295d21b0180fc88c599621 Mon Sep 17 00:00:00 2001
From: Joshua Miller <>
Date: Thu, 19 May 2011 19:13:28 -0700
Subject: [PATCH] Add #<=> and #casecmp to Symbol
kernel/common/symbol.rb | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/kernel/common/symbol.rb b/kernel/common/symbol.rb
View order.rb
def total {|i| i.price.to_f * i.quantity.to_i }.sum *
(1.0 - quantity_discount)
def remaining_total
total -
def quantity_discount
View map.php.html
function initialize() {
var map = new google.maps.Map(document.getElementById("map"), {
center: new google.maps.LatLng(81, -158.5),
zoom: 3,
disableDoubleClickZoom: true,
mapTypeControlOptions: {
mapTypeIds: ["nw"]
map.mapTypes.set('nw', nwMapType);
View Spreadsheet Skeleton.rb
class SpreadsheetConverter < Sinatra::Base
post '/convert' do
content_type "application/xls-or-whatever"
def convert(spreadsheet)
View init.el
(setq mac-option-key-is-meta nil)
(setq mac-command-key-is-meta t)
(setq mac-command-modifier 'meta)
(setq mac-option-modifier nil)
;; via
;; emacs configuration
(push "/usr/local/bin" exec-path)
(add-to-list 'load-path "~/.emacs.d")
You can’t perform that action at this time.