Skip to content

Instantly share code, notes, and snippets.

@task
def run(ctx):
ctx.run("kubectl delete -n pomerium job/pomerium-gen-secrets --ignore-not-found", echo=True)
ctx.run("kubectl apply -f config/05-idp-secret.yaml", echo=True)
# ctx.run("kubectl apply -f config/06-postgres.yaml", echo=True)
ctx.run("kubectl apply -f config/51-pomerium-production-issuer.yaml", echo=True)
ctx.run("kubectl apply -f config/51-pomerium-staging-issuer.yaml", echo=True)
ctx.run("./make_global.py no_cert | kubectl apply -f -", echo=True)
import threadpool
var events1: Channel[int]
events1.send(1)
proc main():
var events2: Channel[int]
events2.send(2)
main()
@drewp
drewp / main.nim
Last active September 19, 2018 22:23
type mgos_gpio_int_handler_f* = proc (pin: cint, arg: pointer) {.cdecl.}
proc mgos_gpio_set_int_handler*(pin: cint, mode: mgos_gpio_int_mode, cb: mgos_gpio_int_handler_f, arg: pointer): bool {.importc, header: "mgos_gpio.h".}
proc mgos_gpio_enable_int*(pin: cint): bool {.importc, header: "mgos_gpio.h".}
type Knob = ref object of RootObj
pin1: cint
pin2: cint
@drewp
drewp / playertest.py
Last active December 18, 2015 07:29
player never prints any lines about messages
import gi
gi.require_version('Gst', '1.0')
from gi.repository import GObject, Gst
from twisted.internet import gireactor, reactor
def main():
GObject.threads_init()
Gst.init(None)
# a messy hack written by Edd Dumbill. http://twitter.com/edd
# You may need to rerun this script if you hit a Twitter Error because you
# use up API rate limiting. That's why we pickle the results, so we can resume
# where we left off.
# get the twitter module using 'easy_install twitter'
from twitter.api import Twitter, TwitterError
from twitter.oauth import OAuth