Skip to content

Instantly share code, notes, and snippets.

View umhan35's full-sized avatar

Zhao Han umhan35

View GitHub Profile
@umhan35
umhan35 / content.md
Created March 13, 2014 04:57
Speed up Rails deployment when using bundler

Run bundle cache

# bundler specific
set :bundle_flags, '--deployment' # from --deployment --quiet
Loading Rails is too slow, services are here to rescue.
#include <Servo.h>
#define SHIFT 7
#define R 0 // Red LED
#define G 1 // Green LED
#define B 2 // Blue LED
#define TIME 15 // Column of Time
#define MAXSN 12 // Max Number of Servos
#define MAXMN 10 // Max Number of Motions
#define MAXFN 8 // Max Number of Frames
@umhan35
umhan35 / openssl
Created April 25, 2014 19:46
openssl
sudo apt-get update && sudo apt-get upgrade openssl
openssl version -b
1:27
@umhan35
umhan35 / email.js
Created July 2, 2014 05:49
email in code
['umhan35', ['myumanitoba', 'ca'].join('.')].join('@')
@umhan35
umhan35 / gist:f7fc738686ffd8e3d06b
Last active August 29, 2015 14:14
Java web tech
Tomcat
Jetty
Netty
Spring (Spring Boot)
Play
@umhan35
umhan35 / gist:46a5fa073b74b1786b86
Created February 1, 2015 20:29
Langs compiling to C
ooc
Vala
Genie
@umhan35
umhan35 / gist:74a690a80aa290965785
Last active August 29, 2015 14:14
run java with jar dependencies
java -classpath bin/ -Djava.ext.dirs=lib/ hanzhao.name.simcard.SimCard
addnginxuser() {
# creating nginx group if he isn't already there
if ! getent group nginx >/dev/null; then
addgroup --system nginx >/dev/null
fi
# creating nginx user if he isn't already there
if ! getent passwd nginx >/dev/null; then
adduser \
--system \