Skip to content

Instantly share code, notes, and snippets.

View jonascheng's full-sized avatar
🏠
Working from home

Jonas Cheng jonascheng

🏠
Working from home
View GitHub Profile
@jonascheng
jonascheng / p4merge4git.md
Created October 24, 2016 02:55 — forked from tony4d/p4merge4git.md
Setup p4merge as a visual diff and merge tool for git
#!/bin/bash
AWS_BASE_DIR=~/.aws
CREDENTIALS_DIR=$AWS_BASE_DIR/credentials.csv
function aws-credentials {
name=$1
if [[ -z $name ]]; then
echo "Syntax: aws-credentials <name>"
@jonascheng
jonascheng / gist:0c18b97378b3e375542538b77c1f2ec9
Created July 18, 2016 16:04
Close a terminal without killing the command running in it
$ sleep 1000
^Z
[1]+ Stopped sleep 1000
$ bg
$ disown
$ exit
@jonascheng
jonascheng / parallel_commands.sh
Created July 10, 2016 06:02
Shell script to concurrent executing the other commands
#!/bin/sh
# ex: ./parallel_commands.sh 'echo test' 'echo test'
for cmd in "$@"; do {
echo "Process \"$cmd\" started";
$cmd & pid=$!
PID_LIST+=" $pid";
} done
trap "kill $PID_LIST" SIGINT
<?xml version="1.0" encoding="UTF-8"?>
<foxyproxy>
<proxies>
<proxy name="emr-socks-proxy" id="2322596116" notes="" fromSubscription="false" enabled="true" mode="manual" selectedTabIndex="2" lastresort="false" animatedIcons="true" includeInCycle="true" color="#0055E5" proxyDNS="true" noInternalIPs="false" autoconfMode="pac" clearCacheBeforeUse="false" disableCache="false" clearCookiesBeforeUse="false" rejectCookies="false">
<matches>
<match enabled="true" name="*ec2*.amazonaws.com*" pattern="*ec2*.amazonaws.com*" isRegEx="false" isBlackList="false" isMultiLine="false" caseSensitive="false" fromSubscription="false" />
<match enabled="true" name="*ec2*.compute*" pattern="*ec2*.compute*" isRegEx="false" isBlackList="false" isMultiLine="false" caseSensitive="false" fromSubscription="false" />
<match enabled="true" name="*10*.amazonaws.com*" pattern="*10*.amazonaws.com*" isRegEx="false" isBlackList="false" isMultiLine="false" caseSensitive="false" fromSubscript
@jonascheng
jonascheng / git.cmd.sh
Created May 10, 2016 06:43
Frequent Git commands
# Permanently authenticating with Git repositories
$ git config credential.helper store
$ git push https://github.com/repo.git
Username for 'https://github.com': <USERNAME>
Password for 'https://[email protected]': <PASSWORD>
@jonascheng
jonascheng / .travis.yml
Created May 3, 2016 07:37
Travis template for nodejs
language: node_js
node_js:
- '4'
install: npm install
script: npm test
notifications:
email:
recipients:
- [email protected]
on_success: always