Skip to content

Instantly share code, notes, and snippets.

View tsechingho's full-sized avatar

Tse-Ching Ho tsechingho

View GitHub Profile
@tsechingho
tsechingho / vips install script at al2023.md
Last active June 9, 2023 06:52
Install vips 8.14.2 in Amazon Linux 2023 from source code

Install vips 8.14.2 into /usr/local in Amazon Linux 2023 from source code

packages ref: https://docs.aws.amazon.com/linux/al2023/release-notes/all-packages.html

sudo yum groupinstall 'Development Tools'
sudo pip3 install meson
# compile dependencies
sudo yum install glib2-devel expat-devel gobject-introspection-devel cmake ninja-build
# image library dependencies
@tsechingho
tsechingho / bundler_config.rake
Last active June 3, 2020 11:58
Temporary solution for deprecation warnings of bundler v2.1+ for capistrano-bundler
# frozen_string_literal: true
# Temporary solution for deprecation warnings of bundler v2.1+.
# https://github.com/capistrano/bundler/issues/115
namespace :load do
task :defaults do
set :bundle_flags, '--quiet'
set :bundle_path, nil
set :bundle_without, nil
@tsechingho
tsechingho / naming_rules.md
Last active August 3, 2017 04:47
Naming rules

Naming rules

Services

Namespace

  • 請優先以業務類型的複數命名。
  • 在業務類型下,以 3rd party provider 名稱或子業務作細項區分。
@tsechingho
tsechingho / postgres_queries_and_commands.sql
Created April 12, 2017 09:41 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@tsechingho
tsechingho / rails http status codes
Created March 18, 2016 07:28 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
$ 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 ;
職務名稱: Rails 工程師
需求人數: 1 - 2 人
職務類別: 軟體設計工程師、Internet程式設計師
工作單位:
* 國立陽明大學 生物資訊研究所 楊永正實驗室
工作項目:
* 生物資訊系統開發。
* 有參與國際合作計畫之機會,歡迎有志者加入。
職能要求: