Skip to content

Instantly share code, notes, and snippets.

@earnubs
earnubs / Vagrantfile
Last active Aug 29, 2015
Basic Vagrantfile...
View 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 Aug 29, 2015
command line Y.Template.Micro compiler
View .gitignore
node_modules
View navbar.css
body {
background-color:orange;
}
.foo {
background-color:lime;
}
div {
border:4px solid black;
View start_env.sh
#!/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'
View blanket.js
'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 Aug 29, 2015
yui module build
View gulpfile.js
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 Oct 3, 2014
hinting and linting
View .jscs.json
{
"requireSpaceAfterKeywords": [
"if",
"else",
"for",
"while",
"do",
"switch",
"return",
"try",
View gist:0ff5f1d5da601a605dc0
# 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
run a bunch of fswatch tasks
View watch.sh
#!/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 Oct 26, 2011 — forked from tmc/gist:828553
%s/Controller/Router/g
View gist:1316575
<!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>