Skip to content

Instantly share code, notes, and snippets.

View benjamintanweihao's full-sized avatar

Benjamin Tan Wei Hao benjamintanweihao

View GitHub Profile
@jj1bdx
jj1bdx / erlang-17.0-rc2-wx-osx.md
Last active August 29, 2015 13:56
Installation of Erlang R16B03-1 and 17.0-rc2 to OS X 10.9.2 with Xcode and wxWidgets 3.0.0

Installation of Erlang R16B03-1 and 17.0-rc2 to OS X 10.9.2 with Xcode and wxWidgets 3.0.0

Installing wxWidgets

class Blah
def add(x, y)
x + y
end
end
# => nil
class Symbol
def call(*args, &block)
->(o) { o.send(self, *args, &block) }
end
@chrismccord
chrismccord / gist:42b85fc01164dc6ac94d
Created May 29, 2014 02:56
Elixir/Sidekiq Pseudo Example
class StatsController
  def update
    # call sidekiq worker as normal
    TwitterStatsWorker.perform_async(twitter_user.pin, twitter_user.token)
  end
end

class TwitterStatsWorker
 include Sidekiq::Worker
@cheeaun
cheeaun / rdrc2014.md
Last active August 29, 2015 14:03
RedDotRubyConf 2014 links & resources
@thunklife
thunklife / packages.el
Created July 6, 2015 21:33
elm-mode for Spacemacs
;;; packages.el --- elm Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
@zires
zires / deploy.rb
Created June 1, 2011 19:30
deploy use unicorn and nginx
set :application, "hermes"
set :repository, "git@your_repository:hermes.git"
set :user, 'root'
set :use_sudo, false
set :deploy_via, :remote_cache
set :scm, :git
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
role :web, "xxx.com" # Your HTTP server, Apache/etc
@cloudbring
cloudbring / .rvmrc
Created December 20, 2011 18:45 — forked from sr/Gemfile
Janky on Heroku
#!/usr/bin/env bash
# This is an RVM Project .rvmrc file, used to automatically load the ruby
# development environment upon cd'ing into the directory
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional.
environment_id="ruby-1.9.2-p290@jankd"
#
# Uncomment following line if you want options to be set only for given project.
@cheeaun
cheeaun / rdrc2013.md
Last active December 18, 2015 04:59
RedDotRubyConf 2013 links & resources
@r00k
r00k / gist:5885955
Created June 28, 2013 16:19
Notes for my talk at Engineers4Engineers at Constant Contact on 6/28/13.
My name is Ben Orenstein and I work at thoughtbot in Boston.
Notes will be published.
I'd like to tell you a story. (5:42)
I've never talked about this publicly.
Umass.
Second job.
Version control.
Successful since then.
@cromwellryan
cromwellryan / Guardfile
Last active December 19, 2015 08:19
Guardfile for elixirc
guard 'shell', :elixirc_bin => "/usr/local/elixirc" do
watch(/(.+\.ex$)/) { |m| `elixirc #{m[0]}` }
end
guard 'shell', :elixir_bin => "/usr/local/elixir" do
watch(/(.+\.exs$)/) { |m| `elixir #{m[0]}` }
end