Skip to content

Instantly share code, notes, and snippets.

@jdcantrell
jdcantrell / local-dev.conf
Created October 7, 2013 06:53
This is part of my solution to replicate pow(ruby script)/anvil(osx app) on linux. You can symlink folders to ~/.sites/blarg and then view content in the browser by going to blarg.dev. If you're using ruby or python you can also startup an app server(unicorn/gunicorn/others) listening to 8080. I use dnsmasq to send all *.dev domains to localhost.
upstream app_server {
server localhost:8080 fail_timeout=0;
}
server {
listen 80;
server_name "~^(?<base_dir>.+)\.dev$";
access_log /var/log/nginx/dev.access.log main;
error_log /var/log/nginx/dev.error.log;
@jdcantrell
jdcantrell / .jshintrc
Created April 10, 2012 22:55
JSHint settings
{
"browser": true,
"jquery": true,
"indent": 2,
"white": true,
"curly": true,
"forin": true,
"noarg": true,
"immed": true,
"newcap": true,
@jdcantrell
jdcantrell / gist:2231240
Created March 28, 2012 22:46
svn diff alias
alias sd="svn st | cut -c8- | sed -e '/local.conf/d' -e '/.htaccess/d' -e '/site.conf/d' | xargs svn diff | colordiff | less -R"
@jdcantrell
jdcantrell / Guardfile.rb
Created February 6, 2012 22:28
FeDev Guard (better)
# Add files and commands to this file, like the example:
# watch('file/path') { `command(s)` }
#
#
$username = 'jcantrell'
guard :shell do
$last_call = Time.now
Notifier.turn_on
@jdcantrell
jdcantrell / Guardfile
Created December 8, 2011 18:53
Base Guardfile for local dev on FeDev
# Add files and commands to this file, like the example:
# watch('file/path') { `command(s)` }
#
#
$username = 'jcantrell';
guard 'shell' do
def sync(from, to)
system("rsync -avz ./#{from}/ #{$username}@fedev.utah.trulia.com:#{to}/ --exclude '.svn'")
@jdcantrell
jdcantrell / fabfile.py
Created December 8, 2011 18:50
FeDev Fabfile
from __future__ import with_statement
from fabric.api import task, local, lcd, run, cd
from fabric.colors import blue, green, red
username = 'jcantrell'
''' Updates the config files for directory so that they work correctly on
fedev.
Usage: fab setup:directory
'''