Skip to content

Instantly share code, notes, and snippets.

View jollychang's full-sized avatar
🎼
Focusing

William Zhang jollychang

🎼
Focusing
View GitHub Profile

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jollychang
jollychang / jenkins_check_if_buildout_update.sh
Last active August 29, 2015 14:10
jenkins_check_if_buildout_update.sh
# https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-AdvancedFeatures
# http://buildout.readthedocs.org/en/latest/docs/
is_buildout_change=`git diff --stat $GIT_COMMIT $GIT_PREVIOUS_COMMIT | grep -ci "setup.py\|buildout.cfg"` || true
if [ $is_buildout_change -ne 0 ]; then
if [ ! -f bin/buildout ]; then
python bootstrap.py
fi
bin/buildout -vvvn;
fi
@jollychang
jollychang / customsshd
Last active August 29, 2015 14:10 — forked from xfreebird/customsshd
#!/bin/bash
INSTALL_PATH="$HOME/scripts"
SCRIPT_PATH="$INSTALL_PATH/customsshd"
LAUNCHCTL_PATH="$HOME/Library/LaunchAgents/com.my.customsshd.plist"
SSH_KEYS_INSTALL_PATH=$HOME/customkeys
SSH_HOST_KEY=$SSH_KEYS_INSTALL_PATH/ssh_host_key
SSH_HOST_RSA_KEY=$SSH_KEYS_INSTALL_PATH/ssh_host_rsa_key
SSH_HOST_DSA_KEY=$SSH_KEYS_INSTALL_PATH/ssh_host_dsa_key
SSHD_PORT=50111

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jollychang
jollychang / app.plist
Created November 26, 2014 04:02
update ios app plist by PlistBuddy
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist
PUBLIC '-//Apple//DTD PLIST 1.0//EN'
'http://www.apple.com/DTDs/PropertyList-1.0.dtd'>
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
/usr/bin/xcrun -sdk iphoneos PackageApplication -v "${RELEASE_BUILDDIR}/${APPLICATION_NAME}.app" -o "${BUILD_HISTORY_DIR}/${APPLICATION_NAME}.ipa" --sign "${DEVELOPER_NAME}" --embed "${PROVISONING_PROFILE}”
@jollychang
jollychang / move_qaci_email_to_trash_daily.js
Created September 4, 2014 07:00
用google script每天清一下qaci的邮件,前提是收件人为qaci@douban.com的邮件已做filter标记为“QA/jenkins/from_qaci” 直接执行 https://script.google.com/a/macros/douban.com/s/AKfycbwpuCzHvunxGoC34cJIevKsilqH_p57GcDvB_ZzWXqYPv5basTV/exec
// https://script.google.com/a/macros/douban.com/s/AKfycbwpuCzHvunxGoC34cJIevKsilqH_p57GcDvB_ZzWXqYPv5basTV/exec
/**
* Retrieves a given user label by name and logs the number of unread threads
* associated with that that label.
* For more information on interacting with GMail labels, see
* https://developers.google.com/apps-script/class_gmaillabel
*/
@jollychang
jollychang / lastp.sh
Created September 4, 2014 06:58
lastp.sh
lastp() {
filename=`find ~/Desktop/ScreenShots/ -type f -exec stat -f "%m %N" {} \; | sort -n | tail -1 | cut -f2- -d" "`
url=`curl -s -F file=@"$filename" http://p.dapps.douban.com/`
echo $url
}
@jollychang
jollychang / Jenkins email macro.html
Created September 4, 2014 06:58
Jenkins email macro.html
<style type="">
/**
* GitHub theme
*
* @author Craig Campbell
* @version 1.0.4
*/
pre {
border: 1px solid #ccc;
word-wrap: break-word;

模板


标题

设备信息: 型号、系统版本

软件信息: 版本号

前提条件: