Skip to content

Instantly share code, notes, and snippets.

@chrismytton
chrismytton / shoreman.rb
Created March 4, 2012 16:38
shoreman (foreman in shell) homebrew formula
require 'formula'
class Shoreman < Formula
homepage 'https://github.com/hecticjeff/shoreman'
head 'https://github.com/hecticjeff/shoreman.git'
def install
bin.install 'shoreman.sh' => 'shoreman'
end
end
@chrismytton
chrismytton / .gitignore
Created February 17, 2012 23:11
bookmarklet creater
/node_modules

See this article for more details.

I was having problems getting capybara to run with :js => true, turns out that transactional fixtures are to blame.

class Example
  def booom
    raise "Boom"
  end
end
@chrismytton
chrismytton / index.html
Created January 20, 2012 19:00
html5 (mini) boilerplate
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title></title>
@chrismytton
chrismytton / net.hecticjeff.firewall.plist
Created January 19, 2012 19:03
Firewall rule to proxy requests on port 80 to nginx on port 8080
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>net.hecticjeff.firewall</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
@chrismytton
chrismytton / 01_basic.js
Created January 14, 2012 14:51
Bookmarklet templates for #rusichackday
/**
* Basic bookmarklet template.
*
* Change the `iframeSrc` variable to point to your space's new idea
* page. You can adjust the iframe styles and position using the
* `iframeStyle` variable.
*
* For turning this script into a bookmarklet, you should probably take
* a look at https://gist.github.com/1856012.
*/
@chrismytton
chrismytton / php.vim
Created November 1, 2011 15:07
PHP settings for vim (place in ~/.vim/after/ftplugin/php.vim)
setlocal expandtab
setlocal tabstop=4
setlocal shiftwidth=4
setlocal softtabstop=4
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<version>1.0-SNAPSHOT</version>
<artifactId>helloworld</artifactId>
<dependencies>
<dependency>
<?php
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
@chrismytton
chrismytton / index.coffee
Created March 4, 2011 01:38
Stitch handlebars compiler
fs = require 'fs'
module.exports = (module, filename) ->
source = fs.readFileSync filename, 'utf8'
content = """
module.exports = Handlebars.compile(#{JSON.stringify source});
"""
module._compile content, filename