Skip to content

Instantly share code, notes, and snippets.

View hite's full-sized avatar
🎯
Focusing

hite hite

🎯
Focusing
  • emohz.cn
  • HangZhou ,Zhejiang
View GitHub Profile
@hite
hite / gist:3261201
Created August 5, 2012 02:37 — forked from qiukun/gist:3000173
send mail to tumblr by coffeescript and nodemailer
nodemailer = require "nodemailer"
smtpTransport = nodemailer.createTransport "SMTP",
service: "Gmail"
auth:
user:
pass:
mail =
from: ""
@hite
hite / chinese word regexp
Created March 15, 2012 03:00
javascript验证中文的正则表达式
var reg = /^[u4E00-u9FA5]+$/;
@hite
hite / give me the url per line
Created May 30, 2011 08:13
extract a url from a string per line
^.*"(http:.*?)".*$
//animate function
var from = -627,to = 0,step = 100,duration = 50;
var flag = -1;
var timer = setInterval(function(){
if(to>from){
flag = 1;
}
from= from+flag*10;
if(flag*from>to){
Here is a list of scopes to use in Sublime Text 2 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
CoffeeScript: source.coffee
Here is a list of scopes to use in Sublime Text 2 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
CoffeeScript: source.coffee