Skip to content

Instantly share code, notes, and snippets.

View thepatrick's full-sized avatar
🌈
Hi

Patrick Quinn-Graham thepatrick

🌈
Hi
View GitHub Profile
@metral
metral / pulumiWaitFor.ts
Created June 18, 2020 17:42 — forked from timmyers/pulumiWaitFor.ts
Wait for a resource in pulumi
// Make sure x is a true output so pulumi doesn't try to run this function during preview.
const ingressIP = pulumi.all([x]).apply(async ([x]) => {
const kc = new k8sClient.KubeConfig();
const provider = (this.getProvider('kubernetes::') as any)
const kubeConfig = provider.kubeconfig as pulumi.Output<string>;
const ip = kubeConfig.apply(async (config) => {
kc.loadFromString(config);
const k8sApi = kc.makeApiClient(k8sClient.CoreV1Api);
#!/usr/bin/env runhaskell
import System.Process (callCommand)
runcmd args =
putStrLn ("+ " ++ cmd) >> callCommand cmd
where cmd = unwords args
-- (Name of your laptop's internal display, x res, y res)
(internalOutput, intX, intY) = ("eDP1", 3840, 2160)
@steventroughtonsmith
steventroughtonsmith / Foundation.py
Last active November 15, 2023 23:48
UIKit+UIFoundation & Foundation for Pythonista - autoconverted from SDK tbd (includes non-public SPI)
# coding: utf-8
from objc_util import *
NSAKDeserializer = ObjCClass('NSAKDeserializer')
NSAKDeserializerStream = ObjCClass('NSAKDeserializerStream')
NSAKSerializer = ObjCClass('NSAKSerializer')
NSAKSerializerStream = ObjCClass('NSAKSerializerStream')
NSAbstractLayoutGuide = ObjCClass('NSAbstractLayoutGuide')
NSAddressCheckingResult = ObjCClass('NSAddressCheckingResult')
NSAffineTransform = ObjCClass('NSAffineTransform')
# provides a ridiculously simple SSL VPN, using a client side certificate.
# Issuing client side certificates is easy, and there are plenty of
# demos already.
#
# The following files are assumed:
# ca.crt This is your root certificate (note: NOT the key!)
# apache.crt An SSL certificate for this webserver
# apache.key The SSL key (to go with the SSL certificate)
# ca.crl The revocation list from your CA (so you can disable access!)
#