Skip to content

Instantly share code, notes, and snippets.

@jeffcressman
jeffcressman / hack.sh
Created April 1, 2012 14:40 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@jeffcressman
jeffcressman / index.mdown
Created May 22, 2012 20:44 — forked from adamstac/TODO
A Rubyist’s guide to setting up a Mac OS X development environment using Homebrew, RVM, Git and Bundler

Xcode

Install Xcode

Head to the Apple Developer Center to download a copy of the latest Xcode

Homebrew

@jeffcressman
jeffcressman / new_bashrc.sh
Created August 11, 2012 15:35 — forked from josephwecker/new_bashrc.sh
Replace .bashrc, .bash_profile, .profile, etc. with something much more clean, consistent, and meaningful.
#!/bin/bash
# License: Public Domain.
# Author: Joseph Wecker, 2012
#
# Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile?
# Are you tired of trying to remember how darwin/mac-osx treat them differently from linux?
# Are you tired of not having your ~/.bash* stuff work the way you expect?
#
# Symlink all of the following to this file:
# * ~/.bashrc
@jeffcressman
jeffcressman / Handy *nix tricks
Created October 12, 2014 12:01
Handy *nix tricks
# Create an empty test file
dd if=/dev/zero of=test.zip bs=1024k count=10
Change of= to file name
Change count= to 20 for 20mb file, 100 for 1gb file
or
@jeffcressman
jeffcressman / index.md
Last active August 29, 2015 14:08 — forked from rstacruz/index.md

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one

#!/bin/sh
# This program has two feature.
#
# 1. Create a disk image on RAM.
# 2. Mount that disk image.
#
# Usage:
# $0 <dir> <size>
#
@jeffcressman
jeffcressman / ember_examples.md
Created October 16, 2015 01:16 — forked from rwjblue/ember_examples.md
Ember Examples
Verifying that +jeffcressman is my blockchain ID. https://onename.com/jeffcressman

Keybase proof

I hereby claim:

  • I am jeffcressman on github.
  • I am jeffcressman (https://keybase.io/jeffcressman) on keybase.
  • I have a public key whose fingerprint is 1A2A A29F 0121 BD31 1409 F2C3 BC39 ABB1 DA25 1D1A

To claim this, I am signing this object:

@jeffcressman
jeffcressman / promises.js
Created February 25, 2016 06:33
Promise pseudo code
// Promises pseudo code that doesn't really do anything.
// The callback way
app.models.trainer.findById('sdfsdf', function(err, res){
});
// The promise way
new Promise(function(resolve, reject) {
var good = true;