Skip to content

Instantly share code, notes, and snippets.

View ihower's full-sized avatar
🎯
Focusing

Wen-Tien Chang ihower

🎯
Focusing
View GitHub Profile
Faria Systems 是一家以 IB(International Baccalaureate) 國際學校為客戶的 Software as a Service (SaaS) 軟體公司,全球超過九十個不同國家、一千兩百所國際學校使用我們的產品,包括 ManageBac: Planning, Assessment & Reporting System、OpenApply: The Paperless Admissions Office 和 KeyBridge: Integrated billing, CRM and analytics for Xero。
我們對於開發 Integrated information SaaS systems 產品充滿熱情,今年初在台北新設立公司總部,正在擴大招募 Ruby on Rails 開發者。
@ihower
ihower / gist:6132576
Last active June 12, 2019 05:42
Git commit without commit
# First commit
echo "hello" | git hash-object -w --stdin
git update-index --add --cacheinfo 100644 ce013625030ba8dba906f756967f9e9ca394464a hello.txt
git write-tree
git commit-tree aaa96c -m "First commit"
git update-ref refs/heads/master 30b060d9a7b5e93c158642b2b6f64b2b758da40d
# Second commit
#!/bin/sh
### BEGIN INIT INFO
# Provides: redis
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts redis database system
# Description: starts redis using basic start scripts
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
@ihower
ihower / bootstrap
Last active December 11, 2015 09:58
#!/usr/bin/env bash
apt-get update -y
apt-get upgrade -y
apt-get install -y build-essential git-core bison openssl libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libpcre3-dev curl libcurl4-nss-dev imagemagick mysql-common mysql-client libmysqlclient-dev libcurl4-openssl-dev curl nodejs
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p374.tar.gz
tar xvfz ruby-1.9.3-p374.tar.gz
cd ruby-1.9.3-p374
./configure
make
make install
class WelcomeController < ApplicationController
# http://code.google.com/p/mod-spdy/wiki/OptimizingForSpdy#Using_SPDY_server_push
def server_push
response.headers["X-Associated-Content"] =
'"https://www.ihower.tw/assets/application.css":0,
"https://www.ihower.tw/assets/application.js":1,
"https://www.ihower.tw/assets/flags/Taiwan.png":2,
"https://www.ihower.tw/assets/flags/Afghanistan.png":3,
"https://www.ihower.tw/assets/flags/Kenya.png":4'
var spdy = require('spdy'),
express = require('express'),
fs = require('fs');
var options = {
key: fs.readFileSync(__dirname + '/ihower.tw.key'),
cert: fs.readFileSync(__dirname + '/ihower.tw.crt'),
ca: fs.readFileSync(__dirname + '/ca.pem'),
// SPDY-specific options
windowSize: 1024, // Server's window size
@ihower
ihower / gist:4200518
Created December 4, 2012 04:12
RubyConf Taiwan 2012 attendees reminder 會前提醒
Dear attendees:
這週五就是 RubyConf Taiwan 2012,這裡是一些重要資訊提醒:
1. 會場(也就是飯店)地址:
沃田旅店(天母會議中心)
台北市士林區中山北路七段113號 Tel: 02-28752288
注意:會場入口位於天玉街81巷一側, 需從中山北路七段141巷左轉進入
# Use constant directly
class V1
def caculate
Math::PI
end
end
# Use a method
class V2
def pi
def foo
111
rescue
222
ensure
333
end
puts foo # got 111, why????