Skip to content

Instantly share code, notes, and snippets.

Sean Grove sgrove

Block or report user

Report or block sgrove

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:6ebea98f998c6a25fa9fd476244d7c49
https://gist.github.com/sgrove/7c2da3ee8e4894017af98c80b6b5fbb6
View keybase.md

Keybase proof

I hereby claim:

  • I am sgrove on github.
  • I am sgrove (https://keybase.io/sgrove) on keybase.
  • I have a public key whose fingerprint is 35A0 F67E AD5E 19C0 75B2 7F72 C0B8 0362 7E5F CE94

To claim this, I am signing this object:

@sgrove
sgrove / Example_queries.graphql
Created Jul 16, 2018
Example Descuri (URLHound?) Queries
View Example_queries.graphql
{
descuri(url: "https://news.ycombinator.com/user?id=tlrobinson") {
twitter {
links
}
youTube {
uri
}
other {
uri
@sgrove
sgrove / google_maps.gql
Created Jul 14, 2018
Google Maps (Reverse+) Geolocation and Elevation API
View google_maps.gql
{
google(auths: { googleMapsKey: "..." }) {
maps {
intersection: geolocation(address: "Eddy & Franklin St, San Francisco, CA") {
...fullMap
}
point: reverseGeolocation(
point: { lat: 37.7478646802915, lng: -122.4578673697085 }
) {
...fullMap
@sgrove
sgrove / onegraph.gql
Last active Jul 12, 2018
Example multi-service query with OneGraph and GraphQL
View onegraph.gql
{
## Retrieve a YouTube video by its id
youTubeVideo(id: "YX40hbAHx3s") {
snippet {
# Pull out the title
title
# Jump to the channel the video was uploaded to
uploadChannel {
snippet {
# Get the title of the channel
View twitter_example_timeline.json
[
{
"created_at": "Thu Apr 06 15:28:43 +0000 2017",
"id": 850007368138018817,
"id_str": "850007368138018817",
"text": "RT @TwitterDev: 1/ Today we’re sharing our vision for the future of the Twitter API platform!nhttps://t.co/XweGngmxlP",
"truncated": false,
"entities": {
"hashtags": [],
"symbols": [],
@sgrove
sgrove / curl_async.ml
Last active Feb 11, 2019
Bad interaction between Async wrapper around ocurl and httpaf
View curl_async.ml
[@@ocaml.doc " Async support for Curl, see https://github.com/ygrek/ocurl/blob/master/curl_lwt.ml "]
module M = Curl.Multi
type interrupt = unit Async.Ivar.t
type multi =
{
mt: Curl.Multi.mt ;
all_events: (Unix.file_descr, interrupt list) Hashtbl.t ;
wakeners: (Curl.t, Curl.curlCode Async.Ivar.t) Hashtbl.t }
@sgrove
sgrove / curl->clj.clj
Last active Oct 31, 2019
Convert Chrome's `copy-as-curl` to clj-http calls
View curl->clj.clj
(defn curl->clj*
"Given a (single) curl string from Chrome's copy-as-curl, convert it either
into a clj-http call, a task-based http entry, or a shortened
task-based entry"
([curl-str]
(curl->clj* curl-str {}))
([curl-str conv-opts]
(let [clean-opts (:clean conv-opts)
merge-opts (:merge conv-opts)
headers (->
View Test.re
/**
* Welcome to Reason.
*/
open Lwt;
open Cohttp;
open Cohttp_lwt_unix;
let body =
@sgrove
sgrove / console.re
Created Dec 8, 2016
Example Reason+Bucklescript bindings
View console.re
external log : 'anything => unit = "console.log" [@@bs.val];
external trace : 'anything => unit = "console.trace" [@@bs.val];
You can’t perform that action at this time.