Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

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

Charles Tang tang9ian

🏠
Working from home
  • a freelancer & long-term learner.
  • Global
  • X @tang9ian
View GitHub Profile
@tang9ian
tang9ian / iterm2.md
Created April 12, 2020 20:41 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@tang9ian
tang9ian / README.md
Created December 15, 2017 04:50 — forked from hofmannsven/README.md
Notes on Favicons, Tile Icon and Tab Icons
@tang9ian
tang9ian / GIT_Usage.md
Last active January 1, 2020 01:55 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@tang9ian
tang9ian / android_instructions.md
Created November 22, 2017 22:06 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

@tang9ian
tang9ian / Dockerfile
Last active August 29, 2015 14:22 — forked from tobstarr/Dockerfile
FROM ubuntu:12.04
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-6-jdk curl git-core build-essential bzr
RUN mkdir -p /tmp/downloads
# install go
RUN curl -sf -o /tmp/downloads/go1.1.1.linux-amd64.tar.gz -L https://go.googlecode.com/files/go1.1.1.linux-amd64.tar.gz
RUN mkdir -p /opt && cd /opt && tar xfz /tmp/downloads/go1.1.1.linux-amd64.tar.gz
# install jenkins
RUN curl -sf -o /opt/jenkins-1.523.war -L http://mirrors.jenkins-ci.org/war/1.523/jenkins.war
@tang9ian
tang9ian / gist:63023a9e6ecdb9183c37
Created November 20, 2014 02:43
try catch in cfscript
try{
//exectute some code here...
throw(message="cf9+ only for throw in cfscript",detail='the detail for our thrown exception');
catch(any e){
//dump, error log or somethign else here
createObject('java','coldfusion.runtime.OleDateTime').init(javaCast('long',timestamp * 1000))
<script>
function resizeElementHeight(element) {
var height = 0;
var body = window.document.body;
if (window.innerHeight) {
height = window.innerHeight;
} else if (body.parentElement.clientHeight) {
height = body.parentElement.clientHeight;
} else if (body && body.clientHeight) {
height = body.clientHeight;
<!---
Parts of this are based on Tim Dawe's
http://amazonsig.riaforge.org
and
Joe Danziger's Amazon S3 REST Wrapper
http://amazons3.riaforge.org/
Written by Patrick Liess
<cfcomponent output="false">
<!--- Application name, should be unique --->
<cfset this.name = Hash(GetDirectoryFromPath(GetBaseTemplatePath()))>
<!--- How long application vars persist --->
<cfset this.applicationTimeout = createTimeSpan(0,2,0,0)>
<!--- define custom coldfusion mappings. Keys are mapping names, values are full paths --->
<cfset this.mappings = structNew()>
<!--- define a list of custom tag paths. --->
<cfset this.customtagpaths = "">