Skip to content

Instantly share code, notes, and snippets.

{
"results": [
{
"name": "WEBHOOKS",
"features": {
"Webhooks": {
"openAPI": "https://api.hubspot.com/api-catalog-public/v1/apis/webhooks/v3",
"stage": "LATEST"
}
}
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import axios from 'axios';
import type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';
import FormData from 'form-data';
import { ApiError } from './ApiError';
import type { ApiRequestOptions } from './ApiRequestOptions';
import type { ApiResult } from './ApiResult';
// @ts-check
const lodash = require('lodash')
const addrs = require('email-addresses')
/**
*
* @param {*} lib
* @param {string} email Used for last update key
* @param {boolean} reset Whether to clear the key
@tonyxiao
tonyxiao / spec.json
Last active April 13, 2021 23:29
stack bar with rule (Vega-Lite spec from Tue Apr 13 2021)
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"width": 500,
"layer": [
{
"mark": {"type": "bar", "tooltip": true},
"encoding": {
"color": {"field": "supertype"},
"y": {"field": "sum", "type": "quantitative", "scale": {"padding": 1}},
"x": {
@tonyxiao
tonyxiao / docheadRoutes.jsx
Created March 10, 2016 23:00
Inject custom dochead into html returned by meteor server. Credit goes to https://github.com/thereactivestack/meteor-react-router-ssr
import React from 'react'
import {IndexRoute, Route} from 'react-router'
import Helmet from 'react-helmet'
const wrap = (Component) => (location, cb) => {
cb(null, Component)
}
const makeHelmet = (info) => {
const {title, description, image, url} = {
@tonyxiao
tonyxiao / router.js
Created September 9, 2016 05:26
GraphQL authentication
router.post('/graphql', (ctx) => {
return apolloKoa({
schema: executableSchema,
context: {
headers: ctx.request.headers,
},
printErrors: true,
})(ctx)
})
! function(e, n) {
var t = n();
"function" == typeof define && define.amd ? define([], t.getInstance()) : "object" == typeof exports ? (module.exports = t.getInstance(), module.exports.SB = t, module.exports.sendbird = t.getInstance()) : (e.SB = t, e.sendbird = t.getInstance())
}(this, function() {
function e() {
try {
if ("undefined" == typeof navigator || "undefined" == typeof navigator.userAgent) return !1;
var e = navigator.userAgent.toLowerCase();
return -1 != e.indexOf("msie") ? parseInt(e.split("msie")[1]) : !1
} catch (n) {
//
// VideoView.m
// MacVideoWall
//
// Created by David Rönnqvist on 9/28/13.
// This is the source code behind the Mac Video Wall that I was trying to port to iOS in [this Stack Overflow question](http://stackoverflow.com/questions/19065816/ios-alternative-to-qtmovielayer-that-has-non-nil-contents)
//
#import "VideoView.h"
# Uncrustify 0.59
#
# General options
#
# The type of line endings
newlines = auto # auto/lf/crlf/cr
# The original size of tabs in the input
#!/usr/bin/env python
from urlparse import urlparse, parse_qs
import urllib2
import plistlib
import webbrowser
print 'Enter url copied from Crashlytics Beta iOS webpage'
print 'Should look like itms-services://?action=download-manifest&url=https%3A%2F%2Fapps.crashlytics.com%2Fprojects...'
itms_url = raw_input('Enter item-services url: ')
result = urlparse(itms_url)