Skip to content

Instantly share code, notes, and snippets.

View gilbertwat's full-sized avatar

Gilbert Wat gilbertwat

View GitHub Profile
Verifying that +gilbertwat is my blockchain ID. https://onename.com/gilbertwat
<!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;
@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",
@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 / 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 / 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 / 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 :