This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import threadpool | |
var events1: Channel[int] | |
events1.send(1) | |
proc main(): | |
var events2: Channel[int] | |
events2.send(2) | |
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |