Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ndemonner on github.
  • I am ndemonner (https://keybase.io/ndemonner) on keybase.
  • I have a public key whose fingerprint is 858E 98DD 2B69 8AB2 EB40 F9D3 0297 6283 B685 2FD3

To claim this, I am signing this object:

@ndemonner
ndemonner / Vagrantfile
Created July 23, 2015 18:05
Sample Vagrantfile for easy Elixir-based development
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.provision "shell", inline: <<-SHELL
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get install -y nodejs
@ndemonner
ndemonner / gist:7121749
Created October 23, 2013 16:19
Data service from Concierge.
'use strict';
angular.module('neonConciergeApp')
.service 'Data', ($q, $timeout, $rootScope, $parse) ->
# Usage:
# Data.sync $scope,
# path: "users/#{$routeParams.id}"
# include: ["requests/*/room", "currentStay", "currentRoom/property"]
sync: (scope, args) ->
self = this
@ndemonner
ndemonner / just_do_it
Created March 8, 2012 05:06
Simple todo app for Fay
class TodoApp
attr_accessor :todos
def initialize
@todos = []
end
def start
puts "Hi there! Welcome to Just Do It!"
@ndemonner
ndemonner / hasher.rb
Created February 14, 2012 04:50
Hashing example
# we need access to the digest library for proper hashing
require 'digest'
# first we create the object that will do the hashing and store it in the hasher variable
hasher = Digest::SHA256.new
# next we ask for their password
puts "What's your password?"
password = gets.chomp
# Factorial!
push 10
store 0
push 1
store 1
#
# Put the counter value on the stack. If it's 0, we're done
# and register 1 contains the final result.