Skip to content

Instantly share code, notes, and snippets.

View hailiang-wang's full-sized avatar
🌴
On vacation

Hai Liang W. hailiang-wang

🌴
On vacation
View GitHub Profile
@hailiang-wang
hailiang-wang / Ionic---Attempts-At-Different-Navigation-Animations.markdown
Created December 17, 2014 05:38
Ionic - Attempts At Different Navigation Animations
SelectionQueryBuilder q = new SelectionQueryBuilder()
.expr("is_awesome", EQ, true)
.expr("money", GT, 50.0f)
.expr("speed", LT, 21.1f)
.or()
.expr("door_number", EQ, 123)
.or().expr(
new SelectionQueryBuilder()
.expr("a", GT, 0)
.expr("a", LT, 100)
@hailiang-wang
hailiang-wang / wechat-reply
Created January 16, 2015 07:35
nodejs wechat client
if (message.FromUserName === 'diaosi') {
// reply with text
res.reply('hehe');
} else if (message.FromUserName === 'text') {
// another way to reply with text
res.reply({
content: 'text object',
type: 'text'
});
} else if (message.FromUserName === 'hehe') {
@hailiang-wang
hailiang-wang / Ionic-Slider-with-"Transparent"-Header.markdown
Created January 23, 2015 06:20
Ionic Slider with "Transparent" Header
/*
*
* There is now an Angular directive, filter and provider!
* It can be found here: https://github.com/i18next/ng-i18next
* ng-i18next is now part of the i18next rganization!
*
*/
/*
* AngularJS directive for using i18next (http://jamuhl.github.com/i18next)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?><target name="simple" sequenceNumber="12">
<locations>
<location path="${env_var:ECLIPSE_432_HOME}" type="Profile"/>
<location path="${project_loc:builder_external}/builder/lib" type="Directory"/>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.apache.commons.beanutils" version="1.8.0.v201205091237"/>
<unit id="org.apache.commons.collections" version="3.2.0.v2013030210310"/>
<unit id="com.google.guava" version="12.0.0.v201212092141"/>
<unit id="com.google.gson" version="2.1.0.v201303041604"/>
@hailiang-wang
hailiang-wang / send_mail.py
Created March 17, 2015 11:56
Common Tools
import smtplib
import time
import sys
import os, shutil
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
print "Usage:python", sys.argv[0], "[recipient](1..n) subject reports_dir report_suffix"
print "Example:python", sys.argv[0], " wilson@ex.com 'Hey' jake@ex.com /opt/reports .log"