Skip to content

Instantly share code, notes, and snippets.

@sjwu
sjwu / mergeJPEG.sh
Created August 20, 2018 02:55
Merge JPEG into PDF
gs -sDEVICE=pdfwrite -sPAPERSIZE=a4 -o test.pdf /usr/share/ghostscript/9.07/lib/viewjpeg.ps -c "(img-001.jpg) viewJPEG showpage (img-002.jpg) viewJPEG showpage (img-003.jpg) viewJPEG showpage (img-004.jpg) viewJPEG showpage (img-005.jpg) viewJPEG showpage (img-006.jpg) viewJPEG showpage (img-007.jpg) viewJPEG showpage (img-008.jpg) viewJPEG showpage (img-009.jpg) viewJPEG showpage (img-010.jpg) viewJPEG showpage" -f
pdfinfo test.pdf
@sjwu
sjwu / .gitconfig
Created December 22, 2017 03:23 — forked from danny0838/.gitconfig
實用的 Git 配置值
[core]
quotepath = false # 中文檔名如實顯示而不轉碼
autocrlf = false # commit 及 checkout 時不根據作業系統轉換檔案的換行字元 (避免不小心改動原 repo 的換行字元)
safecrlf = false # 檢查文字類檔案是否混合了 CRLF 及 LF 換行字元 (搭配 autocrlf,這裡一起關閉)
ignorecase = false # 檔名大小寫不同時視為相異 (更動大小寫才能 commit)
whitespace = cr-at-eol # diff 時行尾 CRLF 不顯示 ^M
fileMode = false # 忽略檔案的 x 屬性 (for Windows)
symlinks = false # 忽略符號連結 (for Windows)
editor = /usr/bin/vim # 預設的文字編輯器 (for Linux)
[alias]
#!/bin/sh
#
# Script to prepare and restore full and incremental backups created with innobackupex-runner.
#
# This script is provided as-is; no liability can be accepted for use.
#
INNOBACKUPEX=innobackupex-1.5.1
INNOBACKUPEXFULL=/usr/bin/$INNOBACKUPEX
TMPFILE="/tmp/innobackupex-restore.$$.tmp"
@sjwu
sjwu / my.cnf
Created November 23, 2012 02:37
my.cnf for galera
[mysqld]
### mysql general option
bind-address = 0.0.0.0
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql