Skip to content

Instantly share code, notes, and snippets.

Sergey Abakumoff sAbakumoff

Block or report user

Report or block sAbakumoff

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:ffbddb238f06135605e579a4e1242cbd
mutation m {
addStar(input: {starrableId: "MDEwOlJlcG9zaXRvcnkzODM0MjIyMQ==", clientMutationId: "120"}) {
clientMutationId
}
}
View res2.json
{
"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
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
{
"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
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
class FormLogin extends Component {
data() {
return {
username: findDOMNode(this.refs.username).value,
password: findDOMNode(this.refs.password).value,
};
}
render() {
return (
View sample-login5.js
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
onTypeEmail(email) {
return this.setState({ email });
}
onTypePassword(password) {
this.setState({ password });
}
render() {
return (
<View style={login.container}>
View login-sample3.js
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
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})
You can’t perform that action at this time.