Skip to content

Instantly share code, notes, and snippets.

@jdcantrell
jdcantrell / xipio.conf
Last active November 29, 2016 16:48
nginx config for having xip.io working with local dev
upstream xip_app_server {
server localhost:8080 fail_timeout=0;
}
server {
listen 80;
server_name "~^(?<base_dir>.+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.xip.io$";
access_log /var/log/nginx/xip.access.log main;
error_log /var/log/nginx/xip.error.log;
@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
'''
@jdcantrell
jdcantrell / local_dev.conf
Last active January 12, 2016 09:23
Nginx config for having project.dev working locally
upstream app_server {
server localhost:8080 fail_timeout=0;
}
server {
listen 80;
server_name "~^(?<base_dir>.+)\.sim\.bz$";
if ($base_dir = "") {
set $base_dir ".";
}
@jdcantrell
jdcantrell / osx.md
Last active January 1, 2016 04:39
Here are things I like to do with a new osx machine

Apps you download:

  • Alfred + dr dev and colors workflows
  • Firefox
    • adblock
    • measure it
    • web developer (for delete cookies from this domain)
    • greasemonkey + user scripts (only work related ones atm)
  • iTerm2
  • Sequel Pro
  • Dropbox
@jdcantrell
jdcantrell / local.sh
Created December 19, 2013 09:08
local dev bash functions
#Local dev site functions
#find current directory in our list of sites
function dev-find {
pwd=$(pwd)
for link in $(ls ~/.sites)
do
if [[ $pwd = $(readlink -f ~/.sites/$link) ]]; then
echo $link
@jdcantrell
jdcantrell / dev_domains.conf
Created December 18, 2013 19:53
dnsmasq config for project.dev domains on local host
address=/dev/127.0.0.1
@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