View gist:ffbddb238f06135605e579a4e1242cbd
This file contains 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
mutation m { | |
addStar(input: {starrableId: "MDEwOlJlcG9zaXRvcnkzODM0MjIyMQ==", clientMutationId: "120"}) { | |
clientMutationId | |
} | |
} |
View res2.json
This file contains 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
{ | |
"id": "35119531", | |
"title": "Catch Objective-C exception in Swift", | |
"creation_date": "2016-01-31 21:13:12 UTC", | |
"repo": "exposit-ds/lf.swift", | |
"branch": "master", | |
"path": "Platforms/iOS/lf.h", | |
"ext": "h", | |
"line_number": "6" | |
} |
View so_refs_extract.sql
This file contains 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
SELECT | |
q.id id, | |
q.title title, | |
q.creation_date creation_date, | |
t.repo repo, | |
t.branch branch, | |
t.path path, | |
t.ext ext, | |
t.line_number line_number | |
FROM |
View res_refs.json
This file contains 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
{ | |
"id": "0178eab0055540387fe3bd6bb470052dadfdfcf9", | |
"repo": "firulais/jsdelivr", | |
"branch": "master", | |
"path": "files/leaflet.esri/1.0.0-rc.8/builds/feature-layer/esri-leaflet-feature-layer-src.js", | |
"ext": "js", | |
"line": " // or hole. this logic was found at http://stackoverflow.com/questions/1165647", | |
"question_id": "1165647", | |
"answer_id": null, | |
"line_number": "77" |
View get_ref.sql
This file contains 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
SELECT | |
files.id AS id, | |
FIRST(files.repo_name) AS repo, | |
REGEXP_EXTRACT(FIRST(files.ref), r"refs/heads/(.*)$") AS branch, | |
FIRST(files.path) AS path, | |
REGEXP_EXTRACT(FIRST(files.path), r'\.([^\.]*)$') AS ext, | |
FIRST(lines.line) AS line, | |
REGEXP_EXTRACT(FIRST(lines.line), r'stackoverflow.com/(?:q|questions)/([0-9]+)') question_id, | |
REGEXP_EXTRACT(FIRST(lines.line), r'stackoverflow.com/(?:a|answers)/([0-9]+)') answer_id, | |
STRING(FIRST(lines.pos)) AS line_number |
View login-sample6.js
This file contains 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
class FormLogin extends Component { | |
data() { | |
return { | |
username: findDOMNode(this.refs.username).value, | |
password: findDOMNode(this.refs.password).value, | |
}; | |
} | |
render() { | |
return ( |
View sample-login5.js
This file contains 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
export default class Login extends Component { | |
changeUsername (event) { | |
this.props.fieldChange('username', event.target.value); | |
} | |
changePassword (event) { | |
this.props.fieldChange('password', event.target.value); | |
} | |
render () { | |
return ( |
View sample-login4.js
This file contains 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
onTypeEmail(email) { | |
return this.setState({ email }); | |
} | |
onTypePassword(password) { | |
this.setState({ password }); | |
} | |
render() { | |
return ( | |
<View style={login.container}> |
View login-sample3.js
This file contains 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 TWBLogin from './TWBLoginComponent' | |
import { bindActionCreators } from 'redux' | |
import { connect } from 'react-redux' | |
import { TWBLoginFormOptions } from 'shared/utils/forms' | |
class LoginHandler extends Component { | |
render () { | |
const { dispatch, _T } = this.props | |
const title = _T('title.twblogin') | |
const defaultTitle = _T('title.site') |
View login-sample2.js
This file contains 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
export default class LoginContainer extends Component { | |
getInitState () { | |
return { username: '', password: ''}; | |
} | |
onSubmit (event) { | |
event.preventDefault(); | |
const {username, password} = this.state; | |
request | |
.post('/admin/login') | |
.send({username, password}) |
NewerOlder