Skip to content

Instantly share code, notes, and snippets.

View jkonowitch's full-sized avatar

Jeffrey Konowitch jkonowitch

  • New York
View GitHub Profile
@jkonowitch
jkonowitch / gist:6664557
Created September 22, 2013 22:41
sublime-prefs
{
"color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme",
"font_face": "Inconsolata",
"font_size": 18.0,
"tab_size": 2,
"translate_tabs_to_spaces": true
}
@jkonowitch
jkonowitch / gist:6664554
Created September 22, 2013 22:41
.gitignore-global
# https://help.github.com/articles/ignoring-files
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
@jkonowitch
jkonowitch / gist:6664550
Created September 22, 2013 22:40
.gitconfig
# http://git-scm.com/book/en/Getting-Started-First-Time-Git-Setup
[user]
name = My Name
email = [email protected]
[color]
ui = true
[alias]
st = status -sb -uall
[core]
editor = subl
# =================
# Rbenv
# =================
eval "$(rbenv init -)"
# =================
# Path
# =================
PATH=$HOME/bin:$PATH

Installing Tools

  1. [HipChat][hipchat]
  • [Upgrade to OS X Mountain Lion][osx]
  • [Xcode][xcode]
    1. Xcode Command Line Tools
  • [Google Chrome][chrome]
  • [Install Homebrew][brew]
    • Then: brew install git rbenv ruby-build rbenv-gem-rehash postgres
  • [Install Ruby + Rails]
@jkonowitch
jkonowitch / gist:6644109
Created September 20, 2013 21:20
dotfile
eval "$(rbenv init -)"
PATH=$HOME/bin:$PATH
# =================
# Bash Prompt
# =================
# --------------------
# Colors for the prompt
# --------------------
@jkonowitch
jkonowitch / Gruntfile.js
Created June 13, 2013 22:19
Sample GruntFile
'use strict';
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
module.exports = function (grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
@jkonowitch
jkonowitch / sign_in_user.rb
Created June 25, 2012 15:31
sign_in_user
class SessionController < ApplicationController
def create
user = User.find_by_email(params[:session][:email])
if user && user.authenticate(params[:session][:password])
sign_in user
redirect_to user
else
redirect_to sign_in_path
end
end
@jkonowitch
jkonowitch / combine.coffee
Created January 9, 2012 02:47
Array Combine - No Duplicates
###
This algorithm merges any items in arr2 that are not already present in the array arr1
It also first screens arr2 for any duplicates before checking against arr1
###
combineArrays = (arr1, arr2) ->
if arr1.length isnt 0 or arr2.length isnt 0
for item, index in arr2
for j in [index+1...arr2.length]
if item is arr2[j] then arr2.splice(j,1)