Skip to content

Instantly share code, notes, and snippets.

View marknorgren's full-sized avatar

Mark Norgren marknorgren

View GitHub Profile
Your user account isn't allowed to install to the system Rubygems.
You can cancel this installation and run:
bundle install --path vendor/bundle
to install the gems into ./vendor/bundle/, or you can enter your password
and install the bundled gems to Rubygems using sudo.
@marknorgren
marknorgren / 0_reuse_code.js
Created May 13, 2014 20:40
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@marknorgren
marknorgren / boxstarter.txt
Last active August 29, 2015 14:01
Boxstarter Script
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
cinst fiddler4
cinst git-credential-winstore
cinst console-devel
cinst sublimetext2
cinst poshgit
#cinst dotpeek
echo -n "My string" | openssl sha1
@marknorgren
marknorgren / gitpython-issue.py
Created May 5, 2014 19:49
gitpython failure
>>> repo.remotes.origin.fetch()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/git/remote.py", line 550, in fetch
return self._get_fetch_info_from_stderr(proc, progress or RemoteProgress())
File "/usr/local/lib/python2.7/site-packages/git/remote.py", line 497, in _get_fetch_info_from_stderr
assert len(fetch_info_lines) == len(fetch_head_info)
AssertionError
@marknorgren
marknorgren / gist:793a3e5b6f2eab901abe
Last active August 29, 2015 14:00
fix for updating (bundle install) octopress on Mavericks
brew install apple-gcc42
#http://stackoverflow.com/a/22704271/406
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
#http://stackoverflow.com/a/14353864/406
$git clone https://github.com/erizhang/octopress.git octopress
$cd octopress/
$sudo gem install bundler
@marknorgren
marknorgren / gist:11328099
Last active August 29, 2015 14:00
dreamhost - pip - virtualenv
# Detailed explanation at http://hitesh.in/2011/running-a-bottle-py-app-on-dreamhost/
#1. Add current directory to path, if isn't already
import sys, os
#INTERP = os.path.join(os.environ['HOME'], '~/bottle.mrkd.co/bottle_env', 'bin', 'python')
INTERP = os.path.expanduser("~/bottle.mrkd.co/bottle_env/bin/python")
if sys.executable != INTERP:
os.execl(INTERP, INTERP, *sys.argv)
# Detailed explanation at http://hitesh.in/2011/running-a-bottle-py-app-on-dreamhost/
#1. Add current directory to path, if isn't already
import os, sys
cmd_folder = os.path.dirname(os.path.abspath(__file__))
if cmd_folder not in sys.path:
sys.path.insert(0, cmd_folder)
import bottle
from bottle import route, run
@marknorgren
marknorgren / multipleFirefoxInstance.sh
Created April 21, 2014 15:35
Multiple Firefox instances
#http://sonnygill.net/mac/mac-multiple-firefox-profiles/
/Applications/Firefox.app/Contents/MacOS/firefox-bin -P MyProfile -no-remote &> /dev/null &
@marknorgren
marknorgren / security-now.md
Last active August 29, 2015 13:58
Security Now Episodes