Skip to content

Instantly share code, notes, and snippets.

@digitup
digitup / Custom.css
Created October 5, 2012 09:18 — forked from bentruyman/Custom.css
IR_Black Theme for Chrome Developer Tools
/**********************************************/
/*
/* IR_Black Skin by Ben Truyman - 2011
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
@digitup
digitup / Chrome console Solarized Dark theme
Created October 5, 2012 09:14 — forked from anonymous/gist:1258555
Solarized Dark Theme (with sidebar and view-source colors) for Google Chrome Dev Tools
/**********************************************/
/*
/* Solarized Dark Skin by Mark Osborne - 2011
/*
/* Based on IR_Black Skin by Ben Truyman:
/* https://gist.github.com/1245727
/*
/* and Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
@digitup
digitup / gist:3523613
Created August 30, 2012 07:10 — forked from alkos333/gist:1771618
jQuery: Get URL Parameters
// Given a query string "?to=email&why=because&first=John&Last=smith"
// getUrlVar("to") will return "email"
// getUrlVar("last") will return "smith"
// Slightly more concise and improved version based on http://www.jquery4u.com/snippets/url-parameters-jquery/
function getUrlVar(key){
var result = new RegExp(key + "=([^&]*)", "i").exec(window.location.search);
return result && unescape(result[1]) || "";
}
@digitup
digitup / Server - Nginx 502 bad gateway.sh
Created August 29, 2012 06:13
Server: Nginx 502 bad gateway
Add to nginx config file located at /etc/nginx/nginx.conf in the hrml section:
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
@digitup
digitup / git Website workflow 2.sh
Created August 27, 2012 19:36
Git: website workflow 2
To update the website is simply a matter of pushing my local development branch to the website repository...
git push origin dev
...and then, merge the changes into the live website tree. I need to SSH log in to the website server, and run the following command at the website folder:
git merge dev
This will bring the pushed changes, at "dev" branch, to the "master" branch (which is the live site current branch).
* IMPROVING THE UPDATE PROCESS *
@digitup
digitup / Custom.css
Created August 23, 2012 09:34 — forked from bentruyman/Custom.css
Chrome: IR_Black Theme for Chrome Developer Tools
/**********************************************/
/*
/* IR_Black Skin by Ben Truyman - 2011
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
@digitup
digitup / Serve: Copy ssh-key to a remote server.sh
Created August 19, 2012 18:12
Server: Copy a ssh key from local to a remote server.
# found on http://www.howtogeek.com/wiki/Add_Public_SSH_Key_to_Remote_Server_in_a_Single_Command
# generate a key:
ssh-keygen -t rsa
# copy to the remote server.
cat ~/.ssh/id_rsa.pub | ssh user@hostname 'cat >> .ssh/authorized_keys'
@digitup
digitup / git Website workflow
Created August 17, 2012 20:47
Git: website workflow
cd ~/domain.com
git init
git add .
git commit -m "initial import of pre-existing web files"
cd ~/hub.domain.com
git --bare init
cd ~/domain.com
git remote add hub ~/hub.domain.com
git push hub master
cd ~/dev.domain.com
@digitup
digitup / git Post-update
Created August 17, 2012 18:40
Git: post update script
#!/bin/sh
#
# This hook does two things:
#
# 1. update the "info" files that allow the list of references to be
# queries over dumb transports such as http
#
# 2. if this repository looks like it is a non-bare repository, and
# the checked-out branch is pushed to, then update the working copy.
# This makes "push" function somewhat similarly to darcs and bzr.
@digitup
digitup / gist:3284695
Created August 7, 2012 11:38
Server - Change folders and files permissions
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;