Skip to content

Instantly share code, notes, and snippets.

View sunnycmf's full-sized avatar
🎯
Focusing

Sunny Chan sunnycmf

🎯
Focusing
  • Carousell
  • Hong Kong
View GitHub Profile
@sunnycmf
sunnycmf / The Technical Interview Cheat Sheet.md
Created February 8, 2017 08:00 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@sunnycmf
sunnycmf / docker-swarm-101.md
Last active January 22, 2017 01:16
docker swarm 101

Docker Swarm 101

create few machines first...

docker-machine create --driver virtualbox mgr1
docker-machine create --driver virtualbox wrk1
docker-machine create --driver virtualbox wrk2
docker-machine create --driver virtualbox wrk3

setup of swarm hosts.

setup manager node.

@sunnycmf
sunnycmf / deployment-tool-ansible-puppet-chef-salt.md
Created November 11, 2016 07:40 — forked from jaceklaskowski/deployment-tool-ansible-puppet-chef-salt.md
Choosing a deployment tool - ansible vs puppet vs chef vs salt

Requirements

  • no upfront installation/agents on remote/slave machines - ssh should be enough
  • application components should use third-party software, e.g. HDFS, Spark's cluster, deployed separately
  • configuration templating
  • environment requires/asserts, i.e. we need a JVM in a given version before doing deployment
  • deployment process run from Jenkins

Solution

@sunnycmf
sunnycmf / android_instructions.md
Created August 11, 2016 06:39 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

@sunnycmf
sunnycmf / wechat.io.conf
Created May 9, 2016 17:14 — forked from likidu/wechat.io.conf
Nginx Settings for NodeJS App
# Nginx Reverse Proxy for NodeJS Apps
server
{
listen 80;
server_name wechat.io;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/wechat.io;
include none.conf;
if ($http_host != "wechat.io") {
@sunnycmf
sunnycmf / mitmproxy pf
Created May 9, 2016 16:41 — forked from khapota/mitmproxy pf
/etc/pf.anchors/mitm
rdr pass on en0 inet proto tcp to any port 80 -> 127.0.0.1 port 8080
rdr pass on en0 inet proto tcp to any port 443 -> 127.0.0.1 port 8080
@sunnycmf
sunnycmf / pf.conf
Created May 9, 2016 16:41 — forked from khapota/pf.conf
pf conf mac os 10.10
scrub-anchor "com.apple/*"
nat-anchor "com.apple/*"
rdr-anchor "com.apple/*"
rdr-anchor "forwarding"
dummynet-anchor "com.apple/*"
anchor "com.apple/*"
load anchor "com.apple" from "/etc/pf.anchors/com.apple"
load anchor "forwarding" from "/etc/pf.anchors/mitm"
@sunnycmf
sunnycmf / export defining stategrey.js
Last active March 17, 2016 09:04
whats' the different between module.export VS exports.<method_name>
var ErrorLog = common.mongoose.model('ErrorLog', schema);
// differences of line 4 vs 5?
exports = module.exports = ErrorLog;
exports.ErrorLog = ErrorLog;

Responsive Flat UI Kit

A custom UI set built to work with and sit next to Bootstrap 3. Custom select boxes by @catalinred. 3D Scroll effects inspired by @chriscoyier's slide in when scroll down pen. The kit is also responsive!

Try clicking & hovering everything.

Feel free to fork, heart and share!

A Pen by Matt Litherland on CodePen.

@sunnycmf
sunnycmf / gist:6291351
Created August 21, 2013 07:35
iOS passbook signing sh.
openssl pkcs12 -passin pass:"somepass" -in "mycert.p12" -clcerts -nokeys -out certificate.pem
openssl pkcs12 -passin pass:"somepass" -in "mycert.p12" -nocerts -out key.pem -passout pass:"somepass"
openssl smime -binary -sign -certfile WWDR.pem -signer certificate.pem -inkey key.pem -in manifest.json -out signature -outform DER -passin pass:"somepass"