Skip to content

Instantly share code, notes, and snippets.

View gist:aaed76348a92579d9af7
Latest list:
Latest data please read this map:

Keybase proof

I hereby claim:

  • I am lifehome on github.
  • I am lifehome ( on keybase.
  • I have a public key whose fingerprint is 8248 46E2 166F 8EEE DB94 301B CD6B 42C3 56D7 BEF6

To claim this, I am signing this object:

lifehome /
Created Aug 24, 2016
Google Forms + Webhook : JSON example
function onFormSubmit(e) {
var data = {
"form": {
"id": e.source.getId(),
"title": e.source.getTitle() ? e.source.getTitle() : "Untitled Form",
"is_private": e.source.requiresLogin(),
"is_published": e.source.isAcceptingResponses(),
"response": {
"id": e.response.getId(),
lifehome / Probability-v4.js
Last active Oct 23, 2016
ES2015 written script, use with caution.
View Probability-v4.js
/* NOTICE: This file is written in ES2015.
* Please use the --harmony flag for nodejs environment.
* License: CC BY-SA 4.0 by Ivan Ip<>
var iconv = require('iconv-lite'),
request = require('request'),
cheerio = require('cheerio'),
cheerioTableparser = require('cheerio-tableparser'),
lifehome / station.json
Last active Jul 29, 2017
MTR Stations listing
View station.json
"HUH": {
"vid": "000",
"en_name": "Hung Hom",
"zh_name": "紅磡"
"MKK": {
"vid": "001",
"en_name": "Mong Kok East",
"zh_name": "旺角東"
View jumboapi.js
const fs = require('fs'),
maths = require('mathjs'),
restify = require('restify'),
rp = require('request-promise'),
cheerio = require('cheerio'),
cheerioTableparser = require('cheerio-tableparser')
server = restify.createServer({
name: 'wrench-jumbo',
version: '1.0.1'
lifehome /
Last active May 8, 2021 — forked from benkulbertis/
Cloudflare API v4 Dynamic DNS Update in Bash

Cloudflare DDNS bash client with systemd

This is a bash script to act as a Cloudflare DDNS client, useful replacement for ddclient.

Look out!

A newer version is available!

This gist will no longer update, instead please go to for more updated versions.

How to use?

  1. Put the cfupdater files to /usr/local/bin
  • If you are using IPv4 for A record, append -v4 to cfupdater in the following systemd service unit.
lifehome / https-fpm.incl
Last active Aug 17, 2019
Default NGINX Configurations
View https-fpm.incl
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_param HTTPS true;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
lifehome /
Last active Apr 9, 2021
aria2 auto add torrent script for inotify - bash - licensed on AGPL-3.0
discordActorUsername="Aria2 Torrent Automator"
lifehome / 0001-Adhoc-patch-to-add-Whatsapp-button-for-contacting-cu.patch
Created Apr 29, 2021
Very dirty patch to add Whatsapp contact button, Hong Kong area code hardcoded
View 0001-Adhoc-patch-to-add-Whatsapp-button-for-contacting-cu.patch
From f9482c5c0c2da037acf3c08942be711df630dc95 Mon Sep 17 00:00:00 2001
From: Ivan Ip <>
Date: Thu, 29 Apr 2021 23:07:42 +0800
Subject: [PATCH] Adhoc patch to add Whatsapp button for contacting customer
.../BillingInformationViewController.swift | 48 +++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/WooCommerce/Classes/ViewRelated/Orders/Order Details/Customer Section/Billing Information/BillingInformationViewController.swift b/WooCommerce/Classes/ViewRelated/Orders/Order Details/Customer Section/Billing Information/BillingInformationViewController.swift