Skip to content

Instantly share code, notes, and snippets.

View stevepeak's full-sized avatar

Steve Peak stevepeak

View GitHub Profile
@stevepeak
stevepeak / demo.coffee
Last active March 29, 2018 09:21
*Note* You must update in `docker-compose.yml` under `demo.env.STORY_URL` to the new raw version.
# Write your Stories in Storyscript and
# Asyncy will execute them by choreographing microservices.
# What is your email?
email = ""
you = fullcontact person --email email
if you.twitter
handler = python -c 'print("{{you.twitter}}".split("/")[-1])'

Asyncy Individual Contributor License Agreement

Thank you for your interest in contributing to open source software projects (“Projects”) made available by Asyncy or its affiliates (“Asyncy”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Asyncy in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact [email protected].

You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.

import tornado.ioloop
import tornado.web
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write("Hello, world")
def make_app():
return tornado.web.Application([
(r"/", MainHandler),
def run_coroutine_sync(func):
def wrapped(*args, **kwargs):
if kwargs.pop('_in_loop', False):
# used for thread-local state
# only call run_sync on first api call, subsiquent calls are already "in the loop"
return func(*args, **kwargs)
else:
@gen.coroutine
def inner():
res = yield func(*args, **kwargs)
import jwt
import requests
from time import time
pem_file = '/path/to/github.pem' # the absolute path to your Application Pem Certificate issued by GitHub
integration_id = 0 # GitHub Application Integration ID
installation_id = 0 # once installed on an organization. The Organization Integration ID
expire_seconds = 500 # number of seconds the jwt token expires (max ~600 but not designated by GitHub)
slug = 'owner/repo' # name of repo for demo purposes
$ curl -i https://circleci.com/api/v1/project/heroku/heroku-oauth/33
HTTP/1.1 404 Not Found
Access-Control-Allow-Origin: *
Content-Type: text/plain; charset=utf-8
Date: Thu, 09 Jun 2016 11:04:59 GMT
Server: nginx
Set-Cookie: ring-session=bhjAOUGcHJZGvZWri1ugahqx5QK1xLKtoRxTlUT%2BFyuzFd0IATOJd0hfwO1HYp9nmKcpqgHC%2Bo2EBOObMdkaf77X0BsJvl5GnSPME9noaH2nZJOrwbUjK6RUBaIIrhmLHkccfMJt8yOtYPpBmW5AK8GtAqMO7MmcvwXNSVSmH3wHKMXKTwD9PR5yOOJ24EVgtZeBeP65sJkqOiVLGtYimR8EQLCC7AWhIdjnFK3KRE4%3D--gHODrGvSgc5VrppRdeFikkqPH4AS3gao80sdpbLQDQg%3D;Path=/;HttpOnly;Expires=Thu, 08 Jun 2017 23:00:23 +0000;Max-Age=31536000;Secure
Set-Cookie: ab_test_user_seed=0.2719694976718555;Expires=Fri, 09 Jun 2017 11:04:59 +0000;Path=/;Secure
X-Circleci-Identity: i-ea00d470
# all the values below are set by default to all project.
# you can essentially skip these settings in your custom file.
codecov:
notify:
require_ci_to_pass: yes
coverage:
precision: 2
round: down
range: "70...100"
@stevepeak
stevepeak / delete.py
Created April 19, 2016 12:23
AWS delete obj
import hmac
import requests
from hashlib import sha1
from datetime import datetime
from base64 import b64encode
AKI = ''
AKS = ''
bucket = ''
path = ''
@stevepeak
stevepeak / Rakefile
Created February 23, 2016 17:45 — forked from stephanvd/Rakefile
CodeCov setup for parallel_test gem
namespace :codecov do
desc 'Uploads the latest simplecov result set to codecov.io'
task upload: :environment do
require 'simplecov'
require 'codecov'
formatter = SimpleCov::Formatter::Codecov.new
formatter.format(SimpleCov::ResultMerger.merged_result)
end
end