Skip to content

Instantly share code, notes, and snippets.

View arnos-stuff's full-sized avatar
🎯
Focusing

Arno V arnos-stuff

🎯
Focusing
  • Some big IT & Data Consulting Corp @ La Défense (FR)
  • Paris
  • 16:48 (UTC +02:00)
  • X @varn0v
View GitHub Profile
@arnos-stuff
arnos-stuff / animals-index-bash.csv
Created September 13, 2023 04:24
Files for auto generating animal names
index animal letter number bash subindex
0 aardvark a 1 [[ "$letter" == "a" ]] && [[ "$index" == "1" ]] && animal=aardvark 1
1 ant a 1 [[ "$letter" == "a" ]] && [[ "$index" == "2" ]] && animal=ant 2
2 african-tree-pangolin a 1 [[ "$letter" == "a" ]] && [[ "$index" == "3" ]] && animal=african-tree-pangolin 3
3 albatross a 1 [[ "$letter" == "a" ]] && [[ "$index" == "4" ]] && animal=albatross 4
4 alligator a 1 [[ "$letter" == "a" ]] && [[ "$index" == "5" ]] && animal=alligator 5
5 alpaca a 1 [[ "$letter" == "a" ]] && [[ "$index" == "6" ]] && animal=alpaca 6
6 anaconda a 1 [[ "$letter" == "a" ]] && [[ "$index" == "7" ]] && animal=anaconda 7
7 armadillo a 1 [[ "$letter" == "a" ]] && [[ "$index" == "8" ]] && animal=armadillo 8
8 aye-aye a 1 [[ "$letter" == "a" ]] && [[ "$index" == "9" ]] && animal=aye-aye 9
@arnos-stuff
arnos-stuff / axelrod-game-theory.json
Created September 10, 2023 20:05
Axelrod’s celebrated Prisoner’s Dilemma computer tournaments, published in the early 1980s, were designed to find effective ways of acting in everyday interactions with the strategic properties of the iterated Prisoner’s Dilemma game. The winner of both tournaments was tit-for-tat, a program that cooperates on the first round and then, on every …
[
{
"Program": 1,
"Name": "TFT",
"Full Name": "Tit For Tat",
"Description": "TIT FOR TAT starts with a cooperative choice, and thereafter does what the other player did on the previous move. If the opponent cooperates, the program also does next round, and vice-versa",
"Author": [
"Anatol Rapoport"
],
"University": "University of Toronto",
@arnos-stuff
arnos-stuff / game-theory-competition-synthetic.csv
Created September 10, 2023 14:57
Axelrod’s celebrated Prisoner’s Dilemma computer tournaments, published in the early 1980s, were designed to find effective ways of acting in everyday interactions with the strategic properties of the iterated Prisoner’s Dilemma game. The winner of both tournaments was tit-for-tat, a program that cooperates on the first round and then, on every …
Program Name % Preliminary % Wins
1 TFT 42.1 11.0
2 T&C 41.4 30.0
3 NY 41.5 10.2
4 GR 31.0 10.0
5 SH 24.4 6.7
6 S&R 39.9 24.8
7 FR 21.1 4.9
8 DA 13.8 2.1
9 GR 11.8 0.2
@arnos-stuff
arnos-stuff / game-theory-competition-cross.csv
Created September 10, 2023 14:56
Axelrod’s celebrated Prisoner’s Dilemma computer tournaments, published in the early 1980s, were designed to find effective ways of acting in everyday interactions with the strategic properties of the iterated Prisoner’s Dilemma game. The winner of both tournaments was tit-for-tat, a program that cooperates on the first round and then, on every …
Prog. TFT T&C NY GR SH S&R FR DA GR DO FE JO TU NA RAN Mean Rank Point No. of Wins Rank Wins
TFT 600 595 600 600 600 595 600 600 597 597 280 225 279 359 441 504 1 0 15
T&C 600 596 600 601 600 596 600 600 310 601 271 213 291 455 573 500 2 11 2
NY 600 595 600 600 600 595 600 600 433 158 354 374 347 368 464 486 3 1 13.5
GR 600 595 600 600 600 594 600 600 376 309 289 236 305 426 507 482 4 4 6
SH 600 595 600 600 600 595 600 600 348 271 274 272 265 448 543 481 5 3 11.5
S&R 600 596 600 602 600 596 600 600 319 200 252 249 280 480 592 478 6 10 3.5
FR 600 595 600 600 600 595 600 600 307 207 235 213 263 489 598 473 7 6 8
DA 600 595 600 600 600 595 600 600 307 194 238 247 253 450 598 472 8 4 9.5
GR 597 305 462 375 348 314 302 302 588 625 268 238 274 466 548 401 9 5 9.5
@arnos-stuff
arnos-stuff / install-vm.sh
Created September 9, 2023 01:46
Install an ubuntu VM on Proxmox VE / somewhere else - Docker / zsh / K8s / minikube / etc
#!/bin/bash
BREW_ROOT=/home/linuxbrew/.linuxbrew/bin
sudo apt install -y git zsh zsh-static micro
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
mkdir git
git clone https://github.com/arnos-stuff/shell git/shell
cp git/shell/prompts/half-pure.toml .config/starship.toml
@arnos-stuff
arnos-stuff / install-vm.sh
Created September 9, 2023 00:11
Install an ubuntu VM on Proxmox VE / somewhere else - Docker / zsh / K8s / minikube / etc
#!/bin/bash
BREW_ROOT=/home/linuxbrew/.linuxbrew/bin
sudo apt install git zsh zsh-static micro
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
mkdir git
git clone https://github.com/arnos-stuff/shell git/shell
cp git/shell/prompts/half-pure.toml .config/starship.toml
@arnos-stuff
arnos-stuff / install-k8s.sh
Created September 9, 2023 00:04
A botched k8s installer for an ubuntu VM node
#!/bin/bash
sudo apt-get update && sudo apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubectl
echo 'alias k=kubectl' >> ~/.zshenv
echo 'compdef __start_kubectl k' >> ~/.zshrc
@arnos-stuff
arnos-stuff / del-proxmox-cluster.sh
Created September 8, 2023 22:50
Proxmox VE script to remove cluster and detach current node
#!/bin/bash
systemctl stop pve-cluster corosync
pmxcfs -l
rm /etc/corosync/*
rm /etc/pve/corosync.conf
killall pmxcfs
systemctl start pve-cluster
@arnos-stuff
arnos-stuff / ligatured-fonts.json
Last active September 8, 2023 19:37
List of ligatured fonts - 2023 version - Cascadia code added
[
{
"name": "jetbrains-mono",
"website": "https://www.jetbrains.com/lp/mono/",
"description": "JetBrains Mono\u2019s typeface forms are simple and free from unnecessary details. Rendered in small sizes, the text looks crisper.\nThe easier the forms, the faster the eye perceives them and the less effort the brain needs to process them.",
"uri": "https://download.jetbrains.com/fonts/JetBrainsMono-2.304.zip?_gl=1*1jyrilq*_ga*MTg0NjA1MDQ3NS4xNjgzNzI0MjMx*_ga_9J976DJZ68*MTY4MzcyNDIzMS4xLjEuMTY4MzcyNDM1MC42MC4wLjA.&_ga=2.23088563.846408337.1683724231-1846050475.1683724231"
},
{
"name": "fira-code",
"website": "https://github.com/tonsky/FiraCode",
@arnos-stuff
arnos-stuff / docker-install.sh
Last active September 8, 2023 23:54
All the install and post-install commands for docker listed on docs.docker.com/engine/install/ubuntu
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
# Add the repository to Apt sources:
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \