Skip to content

Instantly share code, notes, and snippets.

View puginabox's full-sized avatar

Griffin Byron puginabox

View GitHub Profile
@puginabox
puginabox / objects.html
Created September 30, 2014 20:45
self-invoking anonymous function with objects in an array
<script>
(function() {
var localNamepsaceOBJ = [{
"index1": "ode",
"index2": "to",
"index3": "an",
"index4": "object"
}, {
"index1": "that",
"index2": "is",
@puginabox
puginabox / server.js
Last active August 29, 2015 14:07
to run a Express node server
/*
to run a Express node server:
#install express globally;
sudo npm express -g
sudo npm nodemon -g
cd dir-with-this-file-in
nodemon server.js
@puginabox
puginabox / bower=mcmderr-error-fix.sh
Last active August 29, 2015 14:07
run this to fix Bower error message: "bower ECMDERR Failed to execute git ls-remote --tags"
git config --global url."https://".insteadOf git://
@puginabox
puginabox / 0_reuse_code.js
Last active August 29, 2015 14:08
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
# snag theme: http://noahfrederick.com/blog/2011/lion-terminal-theme-peppermint/
# A two-line colored Bash prompt (PS1) with Git branch and a line decoration
# which adjusts automatically to the width of the terminal.
# Screenshot: http://img194.imageshack.us/img194/2154/twolineprompt.png
# Michal Kottman, 2012
RESET="\[\033[0m\]"
RED="\[\033[0;31m\]"
GREEN="\[\033[01;32m\]"
@puginabox
puginabox / gist:86b40a43721a3d3ad114
Created November 9, 2014 15:01
git clone grunter
git clone git@github.com:puginabox/grunt-starter.git
@puginabox
puginabox / strip-whitespace.sh
Created November 20, 2014 16:23
unix command for stripping and replacing whitespace in a bunch of files
for i in *.pdf; do mv "$i" "`echo $i | sed -e 's, ,-,g'`"; done
@puginabox
puginabox / .gitignore
Last active August 29, 2015 14:10
.gitignore template
######################
#.gitignore template #
######################
###################
# Custom
www
node_modules
vendor
js/lib
@puginabox
puginabox / .bowerrc
Last active August 29, 2015 14:10
.bowerrc
{
"directory": "js/libs"
}
bower install jquery
@puginabox
puginabox / gruntfile.js
Last active August 29, 2015 14:10
gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
compass: {
dev: {
options: {
config: 'config.rb' // the Compass config file
} //options
} //dev
}, //compass
server: {