Skip to content

Instantly share code, notes, and snippets.

View heitortsergent's full-sized avatar

Heitor Tashiro Sergent heitortsergent

View GitHub Profile
@heitortsergent
heitortsergent / Runscope-template-Stoplight-GitHub-sync.json
Last active September 19, 2017 16:56 — forked from gsemino/Runscope-template-Stoplight-GitHub-sync.json
This is a Runscope template for syncing your oas file in Stoplight with GitHub
{
"trigger_url": "https://api.runscope.com/radar/81de52ef-ccf6-4063-ba43-d4755b29d05f/trigger",
"name": "Stoplight-GitHub Sync",
"version": "1.0",
"exported_at": 1505331232,
"steps": [
{
"headers": {},
"url": "https://api.stoplight.io/v1/versions/version-id-here/export/oas.json",
"variables": [
@heitortsergent
heitortsergent / curls
Created March 31, 2016 22:16
Deleting events from Keen IO
Use the extraction endpoint first to make sure you're getting just the events you want to delete. Adjust it by changing the timeframe and filters parameters:
# GET
$ curl https://api.keen.io/3.0/projects/:PROJECT_ID/queries/extraction?api_key=READ_KEY&event_collection=EVENT_COLLECTION&timeframe=this_1_days
After you're sure of getting only the events you want to delete, just make a DELETE request to the endpoint below, with the same parameters you used in the previous request (with the exception of the MASTER_KEY in place of the READ_KEY):
# DELETE
$ curl https://api.keen.io/3.0/projects/:PROJECT_ID/events/:EVENT_COLLECTION?api_key=MASTER_KEY&timeframe=TIMEFRAME&filters=FILTERS
@heitortsergent
heitortsergent / keybase.md
Created September 26, 2015 00:50
Keybase

Keybase proof

I hereby claim:

  • I am heitortsergent on github.
  • I am heitortsergent (https://keybase.io/heitortsergent) on keybase.
  • I have a public key whose fingerprint is A20D FDA0 B5F9 3EC8 DBC3 D37F A4D5 19A7 E9F8 CFF3

To claim this, I am signing this object:

@heitortsergent
heitortsergent / 1.swift
Last active August 29, 2015 14:25
Swift Type Inference
var operandStack = Array<Double>()
@IBAction func operate(sender: UIButton) {
let operation = sender.currentTitle!
if userIsInTheMiddleOfTypingANumber {
enter()
}
switch operation {
@heitortsergent
heitortsergent / Podfile
Last active August 29, 2015 14:22
Podfile for local Keen SDK
target 'KeenLibPodsExample' do
pod 'KeenClient', :path => '~/YOUR/PATH/TO/KeenClient-iOS', :branch => 'reachability_renaming'
pod 'AWSCore'
end
@heitortsergent
heitortsergent / index-1.html
Last active June 25, 2016 07:26
Keen.io + SendGrid Tutorial
<!DOCTYPE html>
<html>
<head>
<title>Layouts &raquo; Hero-Thirds</title>
<link rel="stylesheet" type="text/css" href="../../assets/lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="../../assets/css/keen-dashboards.css" />
</head>
<body class="application">
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
@heitortsergent
heitortsergent / Azkfile.js
Created March 18, 2015 02:09
Azkfile.js for Feedbin + Refresher
/**
* Documentation: http://docs.azk.io/Azkfile.js
*/
// Adds the systems that shape your system
systems({
feedbin: {
// Dependent systems
depends: ["clock", "worker-slow", "worker", "redis", "postgres", "elasticsearch", "memcached"],
// More images: http://images.azk.io
@heitortsergent
heitortsergent / Azkfile.js
Last active August 29, 2015 14:16
Feedbin Config
/**
* Documentation: http://docs.azk.io/Azkfile.js
*/
// Adds the systems that shape your system
systems({
feedbin: {
// Dependent systems
depends: ["clock", "worker-slow", "worker", "redis", "postgres", "elasticsearch", "memcached"],
// More images: http://images.azk.io
@heitortsergent
heitortsergent / Azkfile.js
Last active August 29, 2015 14:16
Azkfile.js Example
// Adds the systems that shape your system
systems({
'node-example': {
// Dependent systems
depends: ["db"],
// More images: http://registry.hub.docker.com
image: { docker: "azukiapp/nodejs:0.12" },
// Steps to execute before running instances
provision: [
"npm install",
@heitortsergent
heitortsergent / webhook_demo.sh
Created February 26, 2015 22:04
Steps to run webhook demo
# 1. git clone the repository
$ git clone https://github.com/heitortsergent/gimmegif.git
# 2. grab your SendGrid credentials (or create an account first and grab them)
# 3. grab any other service credentials (Giphy's API key for example)
# 4. set up your environment variables (using something like dotenv)