Skip to content

Instantly share code, notes, and snippets.

View bdcheung's full-sized avatar

Brian Cheung bdcheung

View GitHub Profile
@bdcheung
bdcheung / keybase.md
Created September 27, 2017 17:26
keybase.md

Keybase proof

I hereby claim:

  • I am bdcheung on github.
  • I am bdcheungpm (https://keybase.io/bdcheungpm) on keybase.
  • I have a public key ASBpC1_8HbGEUQJ6ScSB_HR3KTxLpt1-f5z__9NPM28SpQo

To claim this, I am signing this object:

@bdcheung
bdcheung / rps.rb
Last active December 3, 2016 17:02
Rock Paper Scissor Game for CareerFoundry
require 'pry'
class RockPaperScissorGame
attr_accessor :player_choice, :computer_choice
CHOICES = {
:p => 'Paper',
:r => 'Rock',
:s => 'Scissor'
}.freeze
@bdcheung
bdcheung / staging.rb
Created February 19, 2016 13:56
Enable ActionMailer previews in staging
Rails::Application.configure do
#########################
# Other config settings #
#########################
# Enable ActionMailer previews in staging
config.action_mailer.preview_path ||= defined?(Rails.root) ? "#{Rails.root}/test/mailers/previews" : nil
config.autoload_paths += [config.action_mailer.preview_path]
routes.append do
get '/rails/mailers' => "rails/mailers#index"
@bdcheung
bdcheung / hi8-fetch.py
Last active February 5, 2016 11:36 — forked from willwhitney/himawari.py
Fetch and untile tiled Himawari-8 images from the http://himawari8.nict.go.jp PNG endpoint, then set them as desktop background on OSX
import requests
import sys
from datetime import datetime, timedelta
import pytz
from PIL import Image
from StringIO import StringIO
import os
# python himawari.py
# stolen from https://gist.github.com/celoyd/39c53f824daef7d363db
@bdcheung
bdcheung / .ackrc
Created September 8, 2015 17:34
My ackrc
--smart-case
--sort-files
--follow
--color
--group
--type-set=coffee=.coffee
--type-set=slim=.slim
--type-set=scss=.scss
--type-set=less=.less