Skip to content

Instantly share code, notes, and snippets.


Gilbert Wat gilbertwat

View GitHub Profile
gilbertwat / gist:4010030
Created Nov 4, 2012 — forked from stran12/gist:1394757
Step-by-step installation of cGit with Nginx
View gist:4010030

How to install cGit on Nginx (Ubuntu server)

Step-by-step installtion of cGit on nginx without funky rewrite rules.


This is for

gilbertwat /
Created Jan 25, 2013
DatePickerDialog that honors the locale set by the app
package com.gilbert.wat.widget;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Calendar;
import android.content.Context;
import android.os.Build;
import android.widget.DatePicker;
gilbertwat /
Created Jun 23, 2013
workstation set up
apt-get update && apt-get upgrade
apt-get install vim git curl build-essential libssl-dev
#ruby just because web dev tools has a lot of tools in ruby
gilbertwat /
Created Aug 26, 2013
A TextView that only click to expand to show full text and click to show shorten text, The ellipsis can be configured too.
package com.mpayme.znap.core.widget;
import java.lang.reflect.Field;
import android.content.Context;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TextView;
View package.json
"name": "testmongo",
"version": "0.1.0",
"description": "test mongo speed",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"author": "",
"license": "MIT",
View todo_list.html
<!DOCTYPE html>
<meta charset="utf-8">
<link href='' rel='stylesheet' type='text/css'>
html {
padding: 5mm;
background-color: #e9e9e9;
View gist:deddc55662fd11c29783
Verifying that +gilbertwat is my blockchain ID.
View .gitconfig
d = diff
dc = diff --cached
ca = commit --amend
co = checkout
st = status
sp = stash pop
su = stash save -u
po = push origin
cm = commit -m
View .zshrc
# Path to your oh-my-zsh installation.
export ZSH=/Users/gilbert/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
if [ -z $COLORTERM ]; then
View .vimrc
" vim-plug stuff
call plug#begin()
" Fuzzy Search
Plug '/usr/local/opt/fzf'
" Surround open / close
Plug 'tpope/vim-surround'
" File explorer
Plug 'scrooloose/nerdtree'