Skip to content

Instantly share code, notes, and snippets.

Hafiz Ismail sogko

Block or report user

Report or block sogko

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
steveluscher /
Last active Sep 26, 2016
GraphQL 0.6.0 migration guide

GraphQL 0.6.0 migration guide

This version of graphql-js introduces a breaking change to the method signature of the resolve() method.

Previously, resolve() had this method signature:

type GraphQLResolveInfo = {
  fieldName: string,
  fieldASTs: Array<Field>,
zhuowei / allactions.txt
Last active Apr 20, 2018
Every URI used in Xcode
View allactions.txt
"contentValues: alert.actions.title]contentValues_
"contentValues: alert.actions.title_
$contentObjects: alert.actions.action^contentObjects_
$contentObjects: alert.actions.action_
koistya / DefaultLayout.jsx
Last active Sep 11, 2019
React.js (ReactJS) Page and Layout components. For a complete sample visit and (demo)
View DefaultLayout.jsx
* Page layout, reused across multiple Page components
* @jsx React.DOM
var React = require('react');
var ExecutionEnvironment = require('react/lib/ExecutionEnvironment');
var Navigation = require('../components/Navigation.jsx');
var DefaultLayout = React.createClass({
#### SETUP
# 1.) Create a simple point layer
curl -X POST -d '{"layer":"geom","lat":"lat","lon":"lon"}' --header "Content-Type:application/json" http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer
# 2.) Add a spatial index
curl -X POST -d '{"name":"geom","config":{"provider":"spatial","geometry_type":"point","lat":"lat","lon":"lon"}}' --header "Content-Type:application/json" http://localhost:7474/db/data/index/node/
orthes / gist:6990564
Created Oct 15, 2013
MongoDB - find duplicates
View gist:6990564
{ $group : {_id : "$fieldName", total : { $sum : 1 } } },
$match : { total : { $gte : 2 } } },
$sort : {total : -1} },
$limit : 5 }
ehoch / Full Site
Last active Dec 11, 2015
Full Site SSL in Spree
View Full Site

Curious how Alarm Grid went full site-wide SSL using Spree? Just create the one decorator below and you're good to go!

Note: This gist will not redirect .xml files so that our feeds do not error out on iPhones which do not support RSS feeds in https.

othiym23 / excerpt.js
Created Dec 1, 2012
mocha is not your friend if you want to test uncaughtException handlers
View excerpt.js
before(function (done) {
* Mocha is extremely zealous about trapping errors, and runs each test
* in a try / catch block. To get the exception to propagate out to the
* domain's uncaughtException handler, we need to put the test in an
* asynchronous context and break out of the mocha jail.
process.nextTick(function () {
// disable mocha's error handler
mochaHandler = process.listeners('uncaughtException').pop();
mmdumi / EncodePolyline
Created Nov 2, 2012
Encode polyline. Google Maps API v3 algorithm. Objective c.
View EncodePolyline
+ (NSString *)encodeStringWithCoordinates:(NSArray *)coordinates
NSMutableString *encodedString = [NSMutableString string];
int val = 0;
int value = 0;
CLLocationCoordinate2D prevCoordinate = CLLocationCoordinate2DMake(0, 0);
for (NSValue *coordinateValue in coordinates) {
CLLocationCoordinate2D coordinate = [coordinateValue MKCoordinateValue];
View Twitter Bootstrap_multi_select_dropdown.html
<!DOCTYPE html>
<script src=""></script>
<link href="" rel="stylesheet" type="text/css" />
<script src=""></script>
<meta charset=utf-8 />
Muximize / MKPolyline+GMEncodedString.h
Created Sep 23, 2012
A category on MKPolyline adding a class method to create a new MKPolyline from a Google Maps Directions API encoded polyline string. See
View MKPolyline+GMEncodedString.h
#import <MapKit/MapKit.h>
@interface MKPolyline (GMEncodedString)
+ (MKPolyline *)polylineWithGMEncodedString:(NSString *)encodedString;
You can’t perform that action at this time.