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
#!/usr/bin/env python | |
import multiprocessing | |
import random | |
import time | |
class Logger: | |
def __init__(self, num_lines, last_output_per_process, terminal_lock): | |
self.num_lines = num_lines |
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
$ ./pluspy -s modules/other/Qsort.tla | |
Enter input: poiuylkjhmnbvcdsxzafgtrewq | |
abcdefghijklmnopqrstuvwxyz | |
----------------------------- MODULE Qsort ----------------------------- | |
EXTENDS Naturals, Sequences, FiniteSets, TLC, Input | |
\* Specification (works reasonably well for sets of cardinality <= 6 | |
\* Takes a set as argument, produces a sorted tuple | |
Sort(S) == CHOOSE s \in [ 1..Cardinality(S) -> S]: |
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
#!/usr/bin/env python3 | |
import argparse | |
from turtle import * | |
def hilbert_curve(step, parity, n): | |
if n < 1: | |
return |
I run several K8S cluster on EKS and by default do not setup inbound SSH to the nodes. Sometimes I need to get into each node to check things or run a one-off tool.
Rather than update my terraform, rebuild the launch templates and redeploy brand new nodes, I decided to use kubernetes to access each node directly.
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
package main | |
import ( | |
"net/http" | |
"sync" | |
"time" | |
"github.com/gin-gonic/gin" | |
) |
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
#!/usr/bin/env bash | |
set -euo pipefail | |
###################### | |
# Script that fetches a list of all images from GCR | |
# uses 3 different users in GCR | |
###################### | |
keyfile="gcr-svc-acc-keyfile.json" | |
projectName="example-project" |
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
#define _GNU_SOURCE | |
#include <errno.h> | |
#include <sched.h> | |
#include <signal.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/mount.h> | |
#include <sys/stat.h> | |
#include <sys/syscall.h> | |
#include <sys/types.h> |
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
#!groovy | |
// imports | |
import jenkins.model.Jenkins | |
// parameters | |
def systemMessage = ''' | |
<h1><span style="background-color: #ff0000">Scheduled maintanence: Jenkins won't be available for use tonight @7pm CST</span></h1> | |
''' |
NewerOlder