Skip to content

Instantly share code, notes, and snippets.

View yutin1987's full-sized avatar

YuTin Liu yutin1987

View GitHub Profile
@yutin1987
yutin1987 / A-Pen-by-Justin-Liu.markdown
Created December 19, 2013 17:42
A Pen by Justin Liu.
@yutin1987
yutin1987 / index.html
Last active August 29, 2015 14:11
jEqXBK
<div class="box--middle">
<img src="http://images.sodahead.com/profiles/0/0/2/4/0/9/7/2/1/I-like-when-girls-kiss-girls-42672842512.jpeg">
</div>
{
"user": {
"debug": true,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "background",
"linters": {
"jscs": {
var async = require('async');
var trycatch = require('trycatch');
function doSomething(cb) {
setTimeout(function(){
throw 999;
});
}
trycatch(function(){
var async = require('async');
function doSomething(cb) {
setTimeout(function(){
throw 999;
});
}
try {
async.series(
<!DOCTYPE html>
<html>
<head>
<title>HTML5, CSS3 and JavaScript demo</title>
</head>
<body>
<h1>Example 1</h1>
<a class="caption caption-1" href="#" data-title="Smug Eagle" data-des="I watched the four riders raise their weapons into the air. Without warning, screaming their war cry. They led the attack, down to the battle they rode.">
<img src="http://tympanus.net/Tutorials/PseudoElementsImageCaptions/images/1.jpg">
</a>
'use strict';
var gcm = require('node-gcm');
var promise = require('bluebird');
var senderId = ''; // setting sender Id
var sendGCM = function(registrationIds, alert) {
return new promise(function(resolve, reject) {
var message = new gcm.Message({
{
"聯醫仁愛": {
"tel": "02-27093600",
"address": ""
},
"聯醫中興": {
"tel": "02-25523234",
"address": ""
},
"聯醫忠孝": {
@yutin1987
yutin1987 / parse.js
Last active August 29, 2015 14:25
PTT parse
var jsdom = require('jsdom');
var promise = require('bluebird');
var request = require("request");
function getURL(url) {
return new Promise(function (resolve, reject) {
var target = url;
var jar = request.jar();
@yutin1987
yutin1987 / sms.js
Created July 25, 2015 12:54
Parse.com 三竹簡訊範例
var crypto = require('crypto');
var sendSMS = function(to, message) {
var promise = new Parse.Promise();
Parse.Cloud.httpRequest({
method: 'GET',
url: 'http://smexpress.mitake.com.tw/SmSendGet.asp?username=' +''+ '&password=' +''+ '&dstaddr=' + to + '&smbody=' + message + '&encoding=UTF8',
header: 'content-type: application/json',
success: function(httpResponse) {
promise.resolve(httpResponse);