Skip to content

Instantly share code, notes, and snippets.

View yutin1987's full-sized avatar

YuTin Liu yutin1987

View GitHub Profile
{
"article": {
"id": 10,
"title": "世界是平的,地球卻是圓的",
"section": [
{
"id": 3,
"sort": 1,
"content": "平的就是平的"
},
http://money.udn.com/money/story/5599/1922141?ref=tab20160827
curl 'https://graph.facebook.com/?ids=http://money.udn.com/money/story/5599/1922141&callback=jQuery1111013099614160592044_1472274118960&_=1472274118961' -H 'accept-encoding: gzip, deflate, sdch, br' -H 'accept-language: en-US,en;q=0.8,zh-TW;q=0.6,zh;q=0.4,zh-CN;q=0.2' -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36' -H 'accept: */*' -H 'cache-control: max-age=0' -H 'authority: graph.facebook.com' -H 'cookie: datr=YBJHVydebcOze0Ovs_hHOkJq; lu=ThkOzBv1rIJnxa8Mvir8k6Zw; _ga=GA1.2.389867831.1469590158; sb=b-0GVyYE8Q6CCAGdzZk0hT10; c_user=1678986882; xs=29%3AkryiEjh3HBErQw%3A2%3A1445784504%3A14635; fr=0MO3Xnca4YWwbHZ9q.AWUOLcpFO8mb0AQZBHPi8CKIFAc.BWIOXq.rd.Fe6.0.0.BXwRwI.AWVFpUjc; csm=2; s=Aa4jTDPadLPOU0Z_.BXrotH; p=-2; act=1472274018028%2F24; presence=EDvF3EtimeF1472274119EuserFA21678986882A2EstateFDt2F_5b_5dElm2FnullEuct2F1472272823BEtrFA2loadA2EtwF3821670140Eat
{
"name": "react-starter-es6-babel",
"browserify": {
"transform": [
[
"babelify",
{
"presets": [
"es2015",
"stage-0",
@yutin1987
yutin1987 / .eslintrc
Created June 27, 2016 07:37
eslint for react native
{
"extends": "airbnb",
"parser": "babel-eslint",
"plugins": ["react-native"],
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".ios.js", ".android.js"]
}
}
@yutin1987
yutin1987 / imgur.js
Created July 26, 2015 05:18
Parse.com upload image to imgur
Parse.Cloud.afterSave($className, function(request) {
var image = request.object.get('image');
if (image) {
Parse.Cloud.httpRequest({
method: 'POST',
url: 'https://api.imgur.com/3/upload',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'Client-ID ' + $clientId
@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);
@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();
{
"聯醫仁愛": {
"tel": "02-27093600",
"address": ""
},
"聯醫中興": {
"tel": "02-25523234",
"address": ""
},
"聯醫忠孝": {
'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({
<!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>