Skip to content

Instantly share code, notes, and snippets.

View earnubs's full-sized avatar

Stephen Stewart earnubs

View GitHub Profile
@earnubs
earnubs / Vagrantfile
Last active August 29, 2015 13:57
Basic Vagrantfile...
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision "ansible" do |ansible|
ansible.playbook = "PATH/TO/site.yml"
ansible.host_key_checking = false
@earnubs
earnubs / .gitignore
Last active August 29, 2015 13:59
command line Y.Template.Micro compiler
node_modules
body {
background-color:orange;
}
.foo {
background-color:lime;
}
div {
border:4px solid black;
#!/bin/bash
PROJECT_ROOT="/path/to/project/"
API_PATH="$PROJECT_ROOT/api/workspace"
WEB_PATH="$PROJECT_ROOT/web/workspace"
cd $API_PATH
tmux new-session -d -s appstore "make build run"
tmux rename-window 'Logs'
'use strict';
module.exports = function(grunt) {
grunt.registerMultiTask('blanket', 'Instrument files with Blanket.js', function() {
var blkt = require("blanket")({
"data-cover-flags": ['*.js']
});
@earnubs
earnubs / gulpfile.js
Last active August 29, 2015 14:05
yui module build
var buffer = require('vinyl-buffer');
var concat = require('gulp-concat');
var fs = require('fs');
var gulp = require('gulp');
var src = require('vinyl-fs').src;
var tap = require('gulp-tap');
var through = require('through2');
var uglify = require('gulp-uglify');
var paths = {
@earnubs
earnubs / .jscs.json
Created October 3, 2014 10:13
hinting and linting
{
"requireSpaceAfterKeywords": [
"if",
"else",
"for",
"while",
"do",
"switch",
"return",
"try",
# Template used to create this container: /usr/share/lxc/templates/lxc-ubuntu
# Parameters passed to the template: -a amd64 -r trusty -b{$USER}
# For additional config options, please look at lxc.container.conf(5)
# Autostart a container with name NAME (change this)
# Common configuration
lxc.include = /usr/share/lxc/config/ubuntu.common.conf
# Container specific configuration
@earnubs
earnubs / watch.sh
Created May 22, 2015 12:52
run a bunch of fswatch tasks
#!/bin/sh -u
folders=( "www/public/images" "www/templates" "www/public/js" "www/public/css")
echo "Sending watched files to ${UBUNTU_CORE_ADDR:?"Need to set UBUNTU_CORE_ADDR"}"
for i in "${folders[@]}"
do
echo $i
fswatch -0 $i | xargs -0 -n 1 -I {} scp {} $UBUNTU_CORE_ADDR:/apps/webdm/current/$i &
done
wait
@earnubs
earnubs / gist:1316575
Created October 26, 2011 14:50 — forked from tmc/gist:828553
%s/Controller/Router/g
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Backbone example</title>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="underscore.js"></script>
<script type="text/javascript" src="backbone.js"></script>