Skip to content

Instantly share code, notes, and snippets.

View briangershon's full-sized avatar

Brian Gershon briangershon

View GitHub Profile
@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

@briangershon
briangershon / gist:832491
Created February 17, 2011 19:44
Integrating Git on Mac OSX with Microsoft TFS on Windows
@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

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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 / 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:

@briangershon
briangershon / gist:cfa5c1ba0e8938eaf85c7ea9a7945c37
Created January 31, 2021 23:26
TypeScript interface for React click event
interface Props {
clickOnSuccess: (
event: React.MouseEvent<HTMLButtonElement>,
url: string
) => void;
}
@briangershon
briangershon / main.css
Created February 18, 2021 06:04
font-family css defaults that look nice across browsers and operating systems
html {
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
}
.code {
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
Bitstream Vera Sans Mono, Courier New, monospace;
}

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