Skip to content

Instantly share code, notes, and snippets.

View gilbertwat's full-sized avatar

Gilbert Wat gilbertwat

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

How to install cGit on Nginx (Ubuntu server)

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

Pre-requisites

This is for :

@gilbertwat
gilbertwat / AppLocaleDatePickerDialog.java
Created January 25, 2013 03:40
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.app.DatePickerDialog;
import android.content.Context;
import android.os.Build;
import android.widget.DatePicker;
@gilbertwat
gilbertwat / setup.sh
Created June 23, 2013 08:06
workstation set up
apt-get update && apt-get upgrade
apt-get install vim git curl build-essential libssl-dev
#js
#java
#ruby just because web dev tools has a lot of tools in ruby
@gilbertwat
gilbertwat / ExpandableTextView.java
Created August 26, 2013 05:56
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;
@gilbertwat
gilbertwat / package.json
Created November 28, 2014 11:31
Test Mongo
{
"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",
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href='http://fonts.googleapis.com/css?family=Indie+Flower' rel='stylesheet' type='text/css'>
<style>
html {
padding: 5mm;
background-color: #e9e9e9;
Verifying that +gilbertwat is my blockchain ID. https://onename.com/gilbertwat
@gilbertwat
gilbertwat / .gitconfig
Created April 26, 2017 01:24
.gitconfig
[alias]
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
@gilbertwat
gilbertwat / .zshrc
Last active June 12, 2017 07:03
zsh rc
# 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
ZSH_THEME="lambda"
else
@gilbertwat
gilbertwat / .vimrc
Last active January 31, 2020 09:19
.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'