Skip to content

Instantly share code, notes, and snippets.

View jmontross's full-sized avatar

Joshua Montross jmontross

View GitHub Profile
@jmontross
jmontross / ec2_client.rb
Created October 14, 2011 19:31 — forked from jtimberman/ec2_client.rb
generate user_data.json with knife, launch instance with it and magic!
# Author:: Adam Jacob <adam@opscode.com>
# Author:: Joshua Timberman <joshua@opscode.com>
#
# Copyright 2009-2010, Opscode, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@jmontross
jmontross / test.rb
Created November 30, 2011 19:18 — forked from heftig/test.rb
def printgrid(table)
strings = table.map do |row|
row.map { |cell| cell.to_s }
end
column_widths = []
strings.each do |row|
row.each_with_index do |cell,i|
column_widths[i] = [column_widths[i] || 1, cell.length + 2].max
end
@jmontross
jmontross / javascriptModule
Created June 21, 2012 17:44
Javascript module pattern with a closure
var awesomeModule = (function () {
var privateVariable;
function privateFunction() {
//do something;
}
return { // <----- this starts the object being returned when this module function executes
init: function () {
@jmontross
jmontross / thoughts-from-10gen-and-tommy
Created August 3, 2012 02:10
rambles from the trenches
Went to a 10gen conference. Cornered smart man named antoinne and got below info.
use profiler built in..
check out google groups...
how to optimize design?
What is the objective of mongo?
denormalizing is about prejoining data.
#
require "test/unit"
class String
def fun_string!
## make it work
end
end
@jmontross
jmontross / Agile
Created August 6, 2012 23:05
Agile Thoughts
treat the business as an experiment - the business decisions are assumptions ...
discover how people learn and interact with a course - not how they should learn and interact.
conduct experiments to determine what techniques will work in their unique circumstances.
@jmontross
jmontross / launch_sublime_from_terminal.markdown
Created August 9, 2012 21:52 — forked from artero/launch_sublime_from_terminal.markdown
Launch Sublime Text 2 from the Mac OS X Terminal. slim is the new mate

I forked this from someon symlinking subl to sublime.

I want slim, because it's well, slimmer.

This assumes you installed sublime text 2. if not - do that here - http://www.sublimetext.com/2

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

The reason why sublime is not shipped default is that it is too long to type. the reason for subl being lame is that it's not a word. textmate is great because I type mate to get along editing whatever directory or file I want. slim is the new mate and gives me those good feelings the way it is typed with few finger movements and has meaning.

ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/slim

@jmontross
jmontross / TODO-Pointmanj
Created August 23, 2012 03:27
pointmanj improvements
consider using xml format of standard resume.
@jmontross
jmontross / set_up_my_machine.sh
Last active December 14, 2015 02:48
Run this file from ~/cookbooks/setup_my_machine.sh with bash after doing the following steps 1. installing command line tools for osx (download x-code from app store, open x-code, preferences -> downloads > command line tools) 2. mkdir ~/cookbooks; cd ~/cookbooks; git clone https://github.com/opscode-cookbooks/dmg; git clone git://github.com/jmo…
#!/bin/bash
# This shell script was created at solowizard.com
#
# Usage:
# Running the script remotely:
# bash < <(curl -s http://www.solowizard.com/soloist_scripts/frsp9k.sh )
# Running the script if you have downloaded it:
# ./frsp9k.sh
#
# http://github.com/tommyh/solo_wizard