Skip to content

Instantly share code, notes, and snippets.

@lynsei
lynsei / docker-compose.yml
Last active March 15, 2022 06:23
[prefecthq] docker-compose.yml for launching it #use-case 6 automation!
version: "3.5"
# Features driving version requirement
# - networks.name 3.5
# - healthcheck.start_period 2.3
# - healthcheck 2.1
services:
# PostgreSQL: the backing database which stores flow metadata
postgres:
image: "postgres:14" # JSONB Subscripting is avail. in PG14!
@lynsei
lynsei / keylesstrust.author.pub
Last active January 16, 2022 16:58
// tag: #czms #cryptomint #User=lynsei
-----CRYPTOMINT-----
// ;
// ED.
// E#Wi
// i j. E###G.
// LE :;;;;;;;;;;;;;. EW, E#fD#W;
// L#E jWWWWWWWW###L E##j E#t t##L
// G#W. ,W#f E###D. E#t .E#K,
// D#K. ,##f E#jG#W; E#t j##f
// E#K. i##j E#t t##f E#t :E#K:
from scipy.stats import ks_2samp
# Run a montecarlo simulation over 1,000 turns to get distribution of KS scores for each
def KS_MonteCarlo(euro_league, n_teams, n_seasons):
simulation = np.arange(1,1001,1)
ks_run =[]
for run in simulation:
flat20 = perfect_competition(n_teams, n_seasons).T.to_numpy().flatten()
ks_run.append(ks_2samp(euro_league.Pts, flat20).statistic)
@lynsei
lynsei / .gitignore
Last active February 24, 2022 15:05
[cloud-init] #Ubuntu #Hard #CIS #hardened 20.04 #splunk #lynslang
node_modules
@lynsei
lynsei / Caching multi-stage builds in GA.md
Created October 10, 2021 21:05 — forked from UrsaDK/Caching multi-stage builds in GA.md
Speed up your multistage builds in GitHub Actions

Caching multi-stage builds in GitHub Actions

Caching Docker builds in GitHub Actions is an excellent article by @dtinth which analyses various strategies for speeding up builds in GitHub Actions. The upshot of the article is a fairly decisive conclusion that the best two ways to improve build times are:

  1. Build images via a standard docker build command, while using GitHub Packages' Docker registry as a cache = Longer initial build but fastest re-build times.

  2. Build your images via docker integrated BuildKit (DOCKER_BUILDKIT=1 docker build), while using a local registry and actions/cache to persist build caches = Fastest initial build but slightly longer re-build times.

The problem

@lynsei
lynsei / iterm2.md
Created September 27, 2021 01:31 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@tomstuart
tomstuart / setting-up-macos.md
Created January 19, 2020 15:43
Setting up macOS
@afolarin
afolarin / resource_alloc_docker.md
Last active March 18, 2024 17:01
Resource Allocation in Docker

#Container Resource Allocation Options in docker-run

now see: https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources

You have various options for controlling resources (cpu, memory, disk) in docker. These are principally via the docker-run command options.

##Dynamic CPU Allocation -c, --cpu-shares=0
CPU shares (relative weight, specify some numeric value which is used to allocate relative cpu share)

@twasink
twasink / build.gradle
Last active May 17, 2016 22:26
A skeleton for a gradle file to augment ExtJS's Sencha Cmd-generated build scripts. This particular one assumes the application is in a workspace.
ant.importBuild 'build.xml'
def packages_dir = file('../packages')
clean {
doLast { delete 'bootstrap.js', 'bootstrap.css', 'bootstrap.json' }
}
refresh {
inputs.dir 'app'
@mbostock
mbostock / .block
Last active November 24, 2020 15:48
Raster & Vector IV
license: gpl-3.0
redirect: https://observablehq.com/@d3/zoomable-raster-vector