This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"extends": "airbnb", | |
"parser": "babel-eslint", | |
"plugins": ["react-native"], | |
"settings": { | |
"import/resolver": { | |
"node": { | |
"extensions": [".js", ".ios.js", ".android.js"] | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "react-starter-es6-babel", | |
"browserify": { | |
"transform": [ | |
[ | |
"babelify", | |
{ | |
"presets": [ | |
"es2015", | |
"stage-0", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"article": { | |
"id": 10, | |
"title": "世界是平的,地球卻是圓的", | |
"section": [ | |
{ | |
"id": 3, | |
"sort": 1, | |
"content": "平的就是平的" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import knex from 'knex'; | |
export const query = jest.fn(() => Promise.resolve([])); | |
const client = class extends knex.Client { | |
_query = query; | |
acquireConnection = () => Promise.resolve({}); | |
processResponse = resp => resp; | |
releaseConnection = () => Promise.resolve(); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"jest": { | |
"preset": "react-native", | |
"snapshotSerializers": [ | |
"<rootDir>/node_modules/enzyme-to-json/serializer" | |
] | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { PropTypes, Component } from 'react'; | |
import { StyleSheet, View, TouchableOpacity, Image } from 'react-native'; | |
import { Input } from 'component'; | |
import length from 'lodash/size'; | |
import isArray from 'lodash/isArray'; | |
import Cropper from 'react-native-cropper'; | |
import color from 'color'; | |
import size from 'size'; | |
import Text from '../Text/Text'; | |
import Icon from '../Icon/Icon'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
margin: 0 auto !important; | |
padding: 0 !important; | |
overflow: hidden; | |
background-color: transparent !important; | |
} | |
.navbar, .ui-infobar, .ui-toc-label { display: none; } | |
.ui-view-area { | |
position: fixed; | |
bottom: 0px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ BufferedProcess } = require 'atom' | |
atom.commands.add 'atom-text-editor', 'undo-last-commit': (event) -> | |
path = atom.workspace.getCenter().getActiveTextEditor()?.getPath() | |
directory = atom.project.getDirectories().filter((d) -> d.contains(path))[0] | |
output = '' | |
new BufferedProcess | |
command: 'git' | |
args: ['reset', 'HEAD^'] | |
options: |