Skip to content

Instantly share code, notes, and snippets.


David C kccheung

Block or report user

Report or block kccheung

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kccheung /
Created Aug 13, 2016 — forked from monkeydom/
Apple store is down script
while true; do
StoreUp=`curl -s | grep "Mac kaufen" | wc -l`
if [ $StoreUp -eq 0 ]; then
if $WaitForDown; then
kccheung /
Created Aug 13, 2016 — forked from drx/
Tiny script to scrape Apple Online Store every second and check for changes in MacBook availability
import urllib2
import re
import time
import pycurl
import StringIO
#url = ""
url = ""
prev_delivery = (None, None)
kccheung /
Created Aug 13, 2016 — forked from t1m0thy/
Script to check stock at apple stores
For more part numbers for other phone models etc, look here:
import requests
import urllib
kccheung / Logger
Created Aug 24, 2016 — forked from eefret/Logger
Logger class
View Logger
import android.util.Log;
* @author eefret
* Created by Christopher T. Herrera (eefret) on 4/22/2014 [12:41 AM]
* Wrapper class for android Logging utility will select a tag automatically from class, method and line number executed.
public class Logger {
//TODO Create a detail Enum to define the log detail level.
//TODO Create a method that halt every log possible based on the development mode Ex: (PRODUCTION, DEVELOPMENT, DEBUG) that can manage what can be and can't be logged
public class WeakSubscriberDecorator<T> extends Subscriber<T> {
private final WeakReference<Subscriber<T>> mWeakSubscriber;
public WeakSubscriberDecorator(Subscriber<T> subscriber) {
this.mWeakSubscriber = new WeakReference<Subscriber<T>>(subscriber);
kccheung /
Last active Dec 26, 2016
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
Go to Window + Option + Number
Go to Split Pane by Direction + Option + Arrow
Go to Split Pane by Order of Use + ] , + [
kccheung /
Created Dec 26, 2016 — forked from AvnerCohen/
Node.js - npm Cheat Sheet

Node.js - npm Cheat Sheet

(Full description and list of commands at -

##List of less common (however useful) NPM commands

######Prepand ./bin to your $PATH Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:

kccheung / Readme.markdown
Created Jan 11, 2017 — forked from mat/Readme.markdown
apple-app-site-association —with examples
View Readme.markdown

“apple-app-site-association” file

One file for each domain, both and need separate files:

    "applinks": {
        "apps": [],
        "details": {
            "": {
kccheung / SingletonDefaultExportInstance.js
Created Jan 27, 2017 — forked from dmnsgn/SingletonDefaultExportInstance.js
ES6 singleton pattern: module default exports an instance
View SingletonDefaultExportInstance.js
class SingletonDefaultExportInstance {
constructor() {
this._type = 'SingletonDefaultExportInstance';
singletonMethod() {
return 'singletonMethod';
static staticMethod() {
http lib connect timeout (ms) read timeout write timeout concurrency
OkHttp, retrofit, picasso 10,000 10,000 10,000 64 total, 5 per host
Volley 2,500 2,500 2,500 4
HttpUrlConnection up to few minutes up to few minutes n/a 5
You can’t perform that action at this time.