Skip to content

Instantly share code, notes, and snippets.

View benjaminSchilling33's full-sized avatar

b15g // Benjamin Schilling benjaminSchilling33

View GitHub Profile
#!/bin/bash
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
@benjaminSchilling33
benjaminSchilling33 / Setup Docker on WSL2
Last active October 19, 2020 17:54
Install Docker for Debian on WSL2
# See: https://github.com/microsoft/WSL/discussions/4872
sudo apt remove docker docker-engine docker.io containerd runc
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common iptables
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
/sbin/iptables --version
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
# This docker-compose file will spin up an ACS cluster on a local host or on a server and it requires a minimum of 12GB Memory to distribute among containers.
# Limit container memory and assign X percentage to JVM. There are couple of ways to allocate JVM Memory for ACS Containers
# For example: 'JAVA_OPTS: "$JAVA_OPTS -XX:+PrintFlagsFinal -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap"'
# See Oracle docs (https://docs.oracle.com/javase/9/gctuning/parallel-collector1.htm#JSGCT-GUID-CAB83393-3438-44ED-98F0-D15641B43C7D).
# If the container memory is not explicitly set then the flags above will set the max heap default to 1/4 of the container's memory, which may not be ideal.
# For performance tuning, assign the container memory and give a percentage of it to the JVM.
# Using version 2 as 3 does not support resource constraint options (cpu_*, mem_* limits) for non swarm mode in Compose
version: "2"
@benjaminSchilling33
benjaminSchilling33 / company_names.py
Created February 1, 2022 18:00 — forked from jonathanschilling/company_names.py
Combine pairs of words from a set and check if the resulting URL is available.
import requests
# hard-limited timeout (https://stackoverflow.com/a/22096841)
import eventlet
eventlet.monkey_patch()
words = ["met", "metrology", "meas", "measurement", "sensor", "cal", "calibration",
"instrument", "test", "aid", "source", "cyc", "titan", "titanium", "tensor",
"creative", "virtual", "vision", "visionary", "kick", "elegant", "current",
"res", "resolution", "micro", "ultimate", "prime", "exponential", "scientific",