Skip to content

Instantly share code, notes, and snippets.

Avatar

Heitor Tashiro Sergent heitortsergent

View GitHub Profile
@heitortsergent
heitortsergent / Runscope-template-Stoplight-GitHub-sync.json
Last active Sep 19, 2017 — forked from gsemino/Runscope-template-Stoplight-GitHub-sync.json
This is a Runscope template for syncing your oas file in Stoplight with GitHub
View Runscope-template-Stoplight-GitHub-sync.json
{
"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 Mar 31, 2016
Deleting events from Keen IO
View curls
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
View keybase.md

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 Aug 29, 2015
Swift Type Inference
View 1.swift
var operandStack = Array<Double>()
@IBAction func operate(sender: UIButton) {
let operation = sender.currentTitle!
if userIsInTheMiddleOfTypingANumber {
enter()
}
switch operation {
@heitortsergent
heitortsergent / Podfile
Last active Aug 29, 2015
Podfile for local Keen SDK
View Podfile
target 'KeenLibPodsExample' do
pod 'KeenClient', :path => '~/YOUR/PATH/TO/KeenClient-iOS', :branch => 'reachability_renaming'
pod 'AWSCore'
end
@heitortsergent
heitortsergent / index-1.html
Last active Jun 25, 2016
Keen.io + SendGrid Tutorial
View index-1.html
<!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 Mar 18, 2015
Azkfile.js for Feedbin + Refresher
View Azkfile.js
/**
* 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
View Azkfile.js
/**
* 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 Aug 29, 2015
Azkfile.js Example
View Azkfile.js
// 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 Feb 26, 2015
Steps to run webhook demo
View webhook_demo.sh
# 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)
You can’t perform that action at this time.