Skip to content

Instantly share code, notes, and snippets.

View jaychsu's full-sized avatar

Jyun Hong Su jaychsu

View GitHub Profile
@jaychsu
jaychsu / country-code-to-currency-code-mapping.csv
Created February 28, 2017 05:33 — forked from HarishChaudhari/country-code-to-currency-code-mapping.csv
Country, Country Code, Currency code mapping in CSV format Taken from https://gist.github.com/304261 Contains 249 countries.
Country CountryCode Currency Code
New Zealand NZ New Zealand Dollars NZD
Cook Islands CK New Zealand Dollars NZD
Niue NU New Zealand Dollars NZD
Pitcairn PN New Zealand Dollars NZD
Tokelau TK New Zealand Dollars NZD
Australian AU Australian Dollars AUD
Christmas Island CX Australian Dollars AUD
Cocos (Keeling) Islands CC Australian Dollars AUD
Heard and Mc Donald Islands HM Australian Dollars AUD
@jaychsu
jaychsu / rspec_rails_cheetsheet.rb
Created February 13, 2017 06:59 — forked from mlr/rspec_rails_cheetsheet.rb
Rspec Rails cheatsheet with expect syntax (including capybara matchers)
# Model
expect(@user).to have(1).error_on(:username) # checks whether there is an error in username
expect(@user.errors[:username]).to include("can't be blank") # check for the error message
# Rendering
expect(response).to render_template(:index)
# Redirecting
@jaychsu
jaychsu / setup-janus
Last active January 19, 2019 15:55
Setup [janus-gateway](https://github.com/meetecho/janus-gateway) on ubuntu
#!/bin/bash
# REF: https://github.com/meetecho/janus-gateway/blob/master/README.md
# REF: https://groups.google.com/forum/#!msg/meetecho-janus/RYP4FBaeUi0/bIGSPZlpEQAJ
# Tested enviroment: ubuntu {14.04,16.04} LTS
# Tested Janus version: 0.2.0
# 0. Get infos and params without empty
# ======
set -e