Skip to content

Instantly share code, notes, and snippets.

View rschmukler's full-sized avatar

Ryan Schmukler rschmukler

View GitHub Profile
@jcomellas
jcomellas / dynamic_typespec.exs
Created May 15, 2015 01:13
Elixir macro that dynamically adds type specs
# Given a module defined in this way:
defmodule HL7.Composite do
# [...]
defmodule EI do
use HL7.Composite.Def
composite do
component :id, type: :binary, default: ""
component :namespace_id, type: :binary, default: ""
component :universal_id, type: :binary, default: ""
@rschmukler
rschmukler / gitconfig
Created December 3, 2013 15:41
My Gitconfig, sensitive data stripped out...
[color]
branch = auto
diff = auto
status = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
@ryanray
ryanray / deploy.rb
Created November 21, 2013 11:15
I couldn't find a quick example of how to deploy a node.js app using Capistrano 3. This gist assumes you are using Capistrano 3, Upstart, Forever, ssh/forward agent, and an unprivileged user named 'deploy'. Hopefully this simple setup will help to get you started.
# config/deploy.rb
# probably a lot of ways to improve this...
set :application, 'my_app'
set :repo_url, 'git@github.com:USERNAME/my_app.git'
# should set up a deploy user
set :user, 'deploy'
set :deploy_to, '/var/www/my_app'
set :scm, :git