Skip to content

Instantly share code, notes, and snippets.

View tsechingho's full-sized avatar

Tse-Ching Ho tsechingho

View GitHub Profile
ckeditor_rails (4.3.1)
railties (>= 3.0)
$ bundle show rvm-capistrano
/Users/tsechingho/.rvm/gems/ruby-2.0.0-p195/gems/rvm-capistrano-1.3.4.rc1
$ cap rvm:install_ruby
triggering load callbacks
* 2013-06-28 12:20:02 executing `staging'
triggering start callbacks for `rvm:install_ruby'
* 2013-06-28 12:20:02 executing `multistage:ensure'
* 2013-06-28 12:20:02 executing `rvm:install_ruby'
* executing "__LAST_STATUS=0; export CURL_HOME=\"${TMPDIR:-${HOME}}/.rvm-curl-config.$$\"; mkdir ${CURL_HOME}/; { [[ -r ${HOME}/.curlrc ]] && cat ${HOME}/.curlrc; echo \"silent\"; echo \"show-error\"; } > $CURL_HOME/.curlrc; sudo -p 'sudo password: ' /usr/local/rvm/bin/rvm --autolibs=enable requirements ruby-2.0.0-p195; if id | grep ' groups=.*(rvm)' >/dev/null ; then /usr/local/rvm/bin/rvm --autolibs=1 install ruby-2.0.0-p195 ; else sudo -p 'sudo password: ' sg rvm -c '/usr/local/rvm/bin/rvm --autolibs=1 install ruby-2.0.0-p195 ' ; fi ; || __LAST_STATUS=$?; rm -rf $CURL_HOME; exit ${__LAST_STATUS}"
DBI - 1.627
DBD::mysql - 4.023
@tsechingho
tsechingho / chinese_font_family_for_ckeditor.js.coffee
Last active December 16, 2015 19:39
This is an example to set CSS font-family of Chinese for CKEditor 4
CKEDITOR.editorConfig = (config) ->
config.font_names =
'楷體/Georgia, "標楷體", BiauKai, DFKai-SB, "华文楷体", stkaiti, "楷體", KaiTi, "楷体", SimKai, serif;' +
'明體/"Times New Roman", Times, "細明體", MingLiU, "新細明體", PMingLiU, serif;' +
'宋體/"Times New Roman", Times, "儷宋 Pro", "LiSong Pro", "細宋體", SimSun, "新宋體", "宋体", NSimSun, serif;' +
'黑體/Arial, Helvetica, "儷黑 Pro", "LiHei Pro", "微軟正黑體", "Microsoft JhengHei", "黑體", "黑体", SimHei, sans-serif;' +
CKEDITOR.config.font_names
true
upstream some_app_server {
server 127.0.0.1:9393;
}
server {
listen 80;
server_name my-upload-endpoint.com ;
@tsechingho
tsechingho / gist:3412459
Created August 21, 2012 05:58 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
# This file is auto-generated from the current state of the database. Instead of editing this file,
# please use the migrations feature of Active Record to incrementally modify your database, and
# then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your database schema. If you need
# to create the application database on another system, you should be using db:schema:load, not running
# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
Mac-Mini:Codes tsechingho$ rails test -m http://github.com/tsechingho/authlogic_bundle/raw/master/templates/remote.rb
create
create app/controllers
create app/helpers
create app/models
create app/views/layouts
create config/environments
create config/initializers
create config/locales
create db