Skip to content

Instantly share code, notes, and snippets.

@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'")
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;