Skip to content

Instantly share code, notes, and snippets.

View briangershon's full-sized avatar

Brian Gershon briangershon

View GitHub Profile
@briangershon
briangershon / gist:832491
Created February 17, 2011 19:44
Integrating Git on Mac OSX with Microsoft TFS on Windows
@briangershon
briangershon / main.js
Created September 28, 2013 23:55
Using the Q promise library with Parse.com Cloud Code to ease offline development and testing.
/*globals Parse*/
/**
* Playing with using the Q promise library with Parse.com
* to ease offline development and testing.
*
* http://documentup.com/kriskowal/q/
*
* Was tricky to mock-up Parse's promise implementation.
*
@briangershon
briangershon / gist:8554453
Last active January 4, 2016 02:19
Raspberry PI Setup

Download latest Raspbian and write to SD card

# identify the disk (not partition) of your SD card. e.g. disk4 (not disk4s1)
diskutil list
diskutil unmountDisk /dev/<disk# from diskutil>   # e.g. diskutil unmountDisk /dev/disk4
sudo dd bs=1m if=<your image file>.img of=/dev/<disk# from diskutil>
# e.g. sudo dd bs=1m if=2012-12-16-wheezy-raspbian.img of=/dev/disk4
(This will take a few minutes)

Boot Raspberry PI and install a Bonjour client

@briangershon
briangershon / gist:36824075ee64f1ddd2d6
Created September 2, 2014 18:56
Update node.js via Homebrew while keeping npm 1.x (fix for yeoman webapp generator which was failing under npm 2.x beta)
# various Yeoman generators (generator-webapp) are failing due to using npm 2.x beta with errors
# like "grunt 1.4.x" peer dependency not met (when in fact the dependency is met).
# fix for me was to upgrade node, but install npm separately, since upgrading node automatically installs latest npm which is 2.x
# to install latest node
brew update
brew install node --without-npm
# to install latest 1.x branch of npm
@briangershon
briangershon / README.md
Last active August 29, 2015 14:14
Deploying Rails 4.2 App on Heroku

My notes on creating a Rails 4.2 app for hosting on Heroku. With RSpec and Postgresql.

# Install RVM, Ruby and Bundler
...

# Install Rails
gem install rails --no-ri --no-rdoc

# Create new app without Test::Unit, and for Postgresql (for Heroku)

rails new MYAPP --skip-test-unit --database=postgresql

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@briangershon
briangershon / gist:fa9feb08e6a65d52bdc35c738d8cf104
Created January 8, 2017 07:57
Log Request Body for Debugging (golang)
buf, bodyErr := ioutil.ReadAll(r.Body)
if bodyErr != nil {
log.Print("bodyErr ", bodyErr.Error())
http.Error(w, bodyErr.Error(), http.StatusInternalServerError)
return
}
rdr1 := ioutil.NopCloser(bytes.NewBuffer(buf))
rdr2 := ioutil.NopCloser(bytes.NewBuffer(buf))
log.Printf("BODY: %q", rdr1)
@briangershon
briangershon / keybase.md
Created September 13, 2019 12:49
keybase.md

Keybase proof

I hereby claim:

  • I am briangershon on github.
  • I am brianfive (https://keybase.io/brianfive) on keybase.
  • I have a public key whose fingerprint is FACB 3AA6 562C A75C 1708 D187 0B22 B8EE 9244 656E

To claim this, I am signing this object:

Karaoke Session at Rockbox - July 2021

  • In The Navy - Village People
  • Beauty School Dropout Grease
  • Raspberry Beret - Prince
  • It Ain't My Fault - Brothers Osborne
  • Soul Man - Sam & Dave
  • Invisible Sun - The Police
  • Let's Go - The Cars
  • Tenth Avenue Freeze Out - Bruce Springsteen
@briangershon
briangershon / README.md
Last active July 29, 2024 02:32
Minecraft Plugin Development Guide

Minecraft Plugin Development Guide

For those new to Minecraft Plugins, there's a lot of new and old documentation to run through on the web.

Additionally plugins compiled on newer versions of Java weren't working on older stable Minecraft server versions.

I've captured my learning in two places:

  • This guide covers the workflow of editing, compiling and testing plugins.