Skip to content

Instantly share code, notes, and snippets.

View stephenbaidu's full-sized avatar
🏠
Working from home

Stephen Baidu stephenbaidu

🏠
Working from home
  • Microsoft
  • Redmond, WA
View GitHub Profile
@stephenbaidu
stephenbaidu / immutable.rb
Created March 8, 2017 23:41
Include Ruby/Rails module with arguments/options
# Usage
class Payment < ActiveRecord::Base
# Readonly columns
include Immutable.for :customer_id, :amount
end
# Implementation 1: Rails Concern
module Immutable
extend ActiveSupport::Concern
# ***********************************************************************
# Ruby script to flip through my tomod pictures for the MH370
# For Mac users only. Uses AppleScript.
# ***********************************************************************
# ***********************************************************************
# Alert
# ***********************************************************************
puts "Starting in 10 seconds"