Skip to content

Instantly share code, notes, and snippets.

View dwwoelfel's full-sized avatar

Daniel Woelfel dwwoelfel

View GitHub Profile
const resolve = (path, json) => {
if (Array.isArray(json)) {
return json.flatMap((item, i) => resolve([...path, i], item));
}
if (typeof json === 'object') {
return Object.keys(json).flatMap((k) => resolve([...path, k], json[k]));
}
if (typeof json === 'string') {
return [{path, value: json}];
}
@dwwoelfel
dwwoelfel / test
Created February 26, 2021 01:07
Gist description
content
query GistInfo($login: String!, $gistId: String!) {
gitHub {
user(login: $login) {
gist(name: $gistId) {
files {
language {
name
}
text
extension
const x = 'a';
const a = 'a';

Keybase proof

I hereby claim:

  • I am dwwoelfel on github.
  • I am dww (https://keybase.io/dww) on keybase.
  • I have a public key ASBG8gDFXPOVrh1-d3PfaUkBajXSyU4OjrpN55-smBiNLgo

To claim this, I am signing this object:

from gql import Client, gql
from gql.transport.requests import RequestsHTTPTransport
APP_ID = YOUR_APP_ID
HUBSPOT_OAUTH_TOKEN = YOUR_OAUTH_TOKEN
client = Client(retries=2,
transport=RequestsHTTPTransport(
url='https://serve.onegraph.com/dynamic?app_id=' + APP_ID,
from gql import Client, gql
from gql.transport.requests import RequestsHTTPTransport
APP_ID = YOUR_APP_ID
INTERCOM_OAUTH_TOKEN = YOUR_OAUTH_TOKEN
client = Client(retries=2,
transport=RequestsHTTPTransport(
url='https://serve.onegraph.com/dynamic?app_id=' + APP_ID,
@dwwoelfel
dwwoelfel / onegraph.py
Created July 12, 2018 17:41
Python OneGraph Client
# pip3 install gql
# pip3 install requests
from gql import Client, gql
from gql.transport.requests import RequestsHTTPTransport
APP_ID = 'YOUR_APP_ID'
client = Client(retries=2,
transport=RequestsHTTPTransport(