Skip to content

Instantly share code, notes, and snippets.

View waterlou's full-sized avatar

Water Lou waterlou

View GitHub Profile
traceroute to 199.27.135.204 (199.27.135.204), 30 hops max, 60 byte packets
1 f01.hkb-sclaccess3.dyxnet.com (202.134.73.1) 1.241 ms 1.596 ms 1.753 ms
2 g01.hkb-core5.dyxnet.com (202.134.94.76) 13.606 ms 13.705 ms 13.784 ms
3 g01-800.hke-core3.dyxnet.com (202.134.94.104) 15.051 ms 15.043 ms 15.169 ms
4 Gi1-1-402.gw1.hkg4.asianetcom.net (203.192.178.233) 15.801 ms 15.984 ms 15.767 ms
5 CDF-0005.asianetcom.net (203.192.178.6) 16.061 ms 16.050 ms 16.161 ms
6 cf-199-27-135-204.cloudflare.com (199.27.135.204) 16.272 ms 7.735 ms 7.461 ms
@waterlou
waterlou / Cakefile
Created August 11, 2012 09:08
Cakefile for expressjs
###
Cakefile for compiling coffee and less
Author: waterlou
v0.1: initial launch
###
fs = require 'fs'
{spawn,exec} = require 'child_process'
try
@waterlou
waterlou / Cakefile
Created October 22, 2012 06:27
Cakefile for easily compile/watch projects with coffee/less/styles scripts
###
Cakefile for compiling coffee and less
Author: waterlou
v0.1: initial launch
###
fs = require 'fs'
{spawn,exec} = require 'child_process'
try
@waterlou
waterlou / iphonereserve.coffee
Created October 25, 2012 02:16
phantomjs script to automate form submission process for Hong Kong iPhone 5 reservation lucky draw
###
Usage: phantomjs iphonereserve.coffee "First Name" "Last Name" "email address" "ID Card number" "product code" "store code"
product code:
"MD297ZP/A" : 16G Black
"MD298ZP/A" : 16G White
"MD299ZP/A" : 32G Black
"MD300ZP/A" : 32G White
"MD662ZP/A" : 64G Black
"MD663ZP/A" : 64G White
store code:
@waterlou
waterlou / ipadreserve.coffee
Created November 1, 2012 03:19
iPad Mini Hong Kong lucky draw automation
###
Usage: phantomjs ipadreserve.coffee "First Name" "Last Name" "email address" "ID Card number" "product code" "store code"
product code:
"MD528ZP/A" : 16G Black Wifi
"MD531ZP/A" : 16G White Wifi
"MD529ZP/A" : 32G Black Wifi
"MD532ZP/A" : 32G White Wifi
"MD530ZP/A" : 64G Black Wifi
"MD533ZP/A" : 64G White Wifi
store code:
#!/usr/bin/python
import math
def utmToLatLng(zone, easting, northing, northernHemisphere=True):
if not northernHemisphere:
northing = 10000000 - northing
a = 6378137
e = 0.081819191
// change nav bar color
//.navbar-inverse
$grid-float-breakpoint-max = 767px;
bootstrap3-navbar-color(topclass=navbar-default,
navbar-color = #777,
navbar-bg = #f8f8f8,
navbar-border = darken(navbar-bg, 6.5%),
navbar-link-color = #777,

Keybase proof

I hereby claim:

  • I am waterlou on github.
  • I am waterlou (https://keybase.io/waterlou) on keybase.
  • I have a public key ASB9KWXkA_-6tspDVJ2HJjNVnnyYtlApqef-WiJQF3xRCgo

To claim this, I am signing this object:

public enum MaterialColor {
case accent
case primary
case secondary
case success
case danger
case warning
case info
case light
@waterlou
waterlou / materialdesignbutton.swift
Created March 14, 2021 04:05
MaterialButtonStyle
public struct MaterialButtonStyle: ButtonStyle {
public let color: MaterialColor
public let cornerRadius: CGFloat
public let borderWidth: CGFloat
public let maxWidth: Bool
public func makeBody(configuration: Configuration) -> some View {
configuration
.label