Skip to content

Instantly share code, notes, and snippets.

View umhan35's full-sized avatar

Zhao Han umhan35

View GitHub Profile
@umhan35
umhan35 / one way binding...?.html
Last active April 10, 2016 16:28
one way binding...?
<input type="number">
<p></p>
<script type="text/javascript">
var p = document.querySelector('p')
var i = document.querySelector('input')
i.oninput = function () {
p.textContent = this.value
}
</script>
@umhan35
umhan35 / setup.sh
Last active March 28, 2016 19:31
virtualbox, ubuntu server, tinyos, genomote
x.org openbox
SLiM # not very needed
sudo apt-get install tinyos-tools
# also installs tinyos-source
sudo apt-get install gcc-msp430
cp -r tinyos-2.x/support/make/genomote* .
@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
@umhan35
umhan35 / gist:46a5fa073b74b1786b86
Created February 1, 2015 20:29
Langs compiling to C
ooc
Vala
Genie
@umhan35
umhan35 / gist:f7fc738686ffd8e3d06b
Last active August 29, 2015 14:14
Java web tech
Tomcat
Jetty
Netty
Spring (Spring Boot)
Play
@umhan35
umhan35 / email.js
Created July 2, 2014 05:49
email in code
['umhan35', ['myumanitoba', 'ca'].join('.')].join('@')
@umhan35
umhan35 / openssl
Created April 25, 2014 19:46
openssl
sudo apt-get update && sudo apt-get upgrade openssl
openssl version -b
1:27
#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
Loading Rails is too slow, services are here to rescue.
# bundler specific
set :bundle_flags, '--deployment' # from --deployment --quiet