Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

function watchtest () {
watchmedo shell-command -W -p "./$1/*;./tests/$1/*" -R -c "phpunit --config tests/phpunit_local.xml tests/$1"
}
@jdcantrell
jdcantrell / gist:91bce12d3cd4c69239db
Last active August 29, 2015 14:05
Almost all pygments supported file extensions comma separated.
'.croc', '.dg', '.factor', '.fy', '.fancypack', '.io', '.lua', '.wlua',
'.md', '.moon', '.pl', '.pm', '.py3tb', '.py', '.pyw', '.sc',
'SConstruct', 'SConscript', '.tac', '.sage', '.pytb', '.rb', '.rbw',
'Rakefile', '.rake', '.gemspec', '.rbx', '.duby', '.tcl', '.c-objdump',
'.s', '.cpp-objdump', '.c++-objdump', '.cxx-objdump', '.d-objdump',
'.s', '.S', '.ll', '.asm', '.ASM', '.objdump', '.adb', '.ads', '.ada',
'.bmx', '.c', '.h', '.idc', '.cbl', '.CBL', '.cob', '.COB', '.cpy',
'.CPY', '.cpp', '.hpp', '.c++', '.h++', '.cc', '.hh', '.cxx', '.hxx',
'.C', '.H', '.cp', '.CPP', '.cu', '.cuh', '.pyx', '.pxd', '.pxi', '.d',
'.di', '.pas', '.dylan-console', '.dylan', '.dyl', '.intr', '.lid',
@jdcantrell
jdcantrell / init.el
Created August 13, 2014 00:10
My attempt at emacs
;;; init.el --- where all the magic begins
;;
;; turn off mouse interface early in startup to avoid momentary display
;; you really don't need these; trust me.
(if (fboundp 'menu-bar-mode) (menu-bar-mode -1))
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
;; load path etc.
@jdcantrell
jdcantrell / css_critic_test_generator.rb
Last active August 29, 2015 14:01
Example plugin for Hologram. This generates the needed files to run csscritic against your style examples.
class CssTestGenerator < Hologram::Plugin
attr :output_dir, :tests
HTML_HEADER = <<-eos
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="/build/css/screen.css">
<!DOCTYPE html>
<html>
<head>
<title>Oh hai</title>
<style>
html { width: 100% }
body {
width: 600px; margin: auto;
font-family: Helvetica, Arial, sans-serif;
font-size: 24px;
@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 / 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 / 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 ".";
}