Skip to content

Instantly share code, notes, and snippets.

View sAbakumoff's full-sized avatar

Sergey Abakumoff sAbakumoff

View GitHub Profile
mutation m {
addStar(input: {starrableId: "MDEwOlJlcG9zaXRvcnkzODM0MjIyMQ==", clientMutationId: "120"}) {
clientMutationId
}
}
{
"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"
}
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
{
"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"
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
class FormLogin extends Component {
data() {
return {
username: findDOMNode(this.refs.username).value,
password: findDOMNode(this.refs.password).value,
};
}
render() {
return (
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 (
onTypeEmail(email) {
return this.setState({ email });
}
onTypePassword(password) {
this.setState({ password });
}
render() {
return (
<View style={login.container}>
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')
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})