Skip to content

Instantly share code, notes, and snippets.

Avatar

Gilbert Wat gilbertwat

View GitHub Profile
@gilbertwat
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.

Pre-requisites

This is for

@gilbertwat
gilbertwat / AppLocaleDatePickerDialog.java
Created Jan 25, 2013
DatePickerDialog that honors the locale set by the app
View AppLocaleDatePickerDialog.java
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 Jun 23, 2013
workstation set up
View setup.sh
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 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.
View ExpandableTextView.java
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>
<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;
View gist:deddc55662fd11c29783
Verifying that +gilbertwat is my blockchain ID. https://onename.com/gilbertwat
View .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
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
ZSH_THEME="lambda"
else
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'