View application_helper.rb
module ApplicationHelper
def gravatar_for(user, opts = {})
opts[:alt] =
image_tag "{Digest::MD5.hexdigest(}?s=#{opts.delete(:size) { 40 }}",
View .bashrc
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
View Dockerfile.rb
#!/usr/bin/env ruby
# encoding: utf-8
require 'set'
require 'yaml'
class Dockerfile
def initialize
@from = "ubuntu:latest"
View gist:d93c220e12a6115dcbf2
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev mercurial libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev
sudo mkdir /usr/include/lua5.1/include
sudo ln -s /usr/include/luajit-2.0 /usr/include/lua5.1/include
cd ~
git clone
View api.js
var express = require('express');
var bcrypt = require('bcrypt-nodejs');
var router = express.Router();
var mongoose = require('mongoose');
var Page = require('../models/page.js');
var adminUser = require('../models/admin-users.js');
// Session Checking Code
function sessionCheck(request, response, next) {

AngularJS + Rails Asset Pipeline

This is my hand-rolled solution for getting Angular assets (Controllers, Models, Directives, Templates, etc.) integrated into the Rails Asset Pipeline.

Templates and the $templateCache

Of particular note: this hack will also load the AngularJS $templateCache with your templates, while allowing you to use Slim, ERB, etc. to write your templates.

View Gulpfile.js
'use strict'
var gulp, sass, babelify, browserify, watchify, source, util;
gulp = require('gulp');
sass = require('gulp-sass');
babelify = require('babelify')
browserify = require('browserify');
watchify = require('watchify');
source = require('vinyl-source-stream');
View .zshrc
# Executes commands at the start of an interactive session.
# Authors:
# Sorin Ionescu <>
# Source Prezto.
# node version manager
export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/
View Gulpfile.js
var gulp = require('gulp');
var livereload = require('gulp-livereload');
// The protractor task
var protractor = require('gulp-protractor').protractor;
// Start a standalone server
var webdriver_standalone = require('gulp-protractor').webdriver_standalone;
View projections
"app/assets/javascripts/": {
"command": "jini"
"app/controllers/api/v1/*_controller.rb": {
"command": "apicontroller",
"alternate": "spec/controllers/api/v1/%s_controller_spec.rb",
"template": "class Api::V1::%SController < ApplicationController\n respond_to :json\nend"
"app/assets/javascripts/models/*": {