Skip to content

Instantly share code, notes, and snippets.

View iamcryptoki's full-sized avatar

Gael Gentil iamcryptoki

View GitHub Profile
______ _______ __ __ _______ ________ ______ __ __ ______
/ \ | \| \ / \| \| \ / \ | \ / \| \
| $$$$$$\| $$$$$$$\\$$\ / $$| $$$$$$$\\$$$$$$$$| $$$$$$\| $$ / $$ \$$$$$$
| $$ \$$| $$__| $$ \$$\/ $$ | $$__/ $$ | $$ | $$ | $$| $$/ $$ | $$
| $$ | $$ $$ \$$ $$ | $$ $$ | $$ | $$ | $$| $$ $$ | $$
| $$ __ | $$$$$$$\ \$$$$ | $$$$$$$ | $$ | $$ | $$| $$$$$\ | $$
| $$__/ \| $$ | $$ | $$ | $$ | $$ | $$__/ $$| $$ \$$\ _| $$_
\$$ $$| $$ | $$ | $$ | $$ | $$ \$$ $$| $$ \$$\| $$ \
\$$$$$$ \$$ \$$ \$$ \$$ \$$ \$$$$$$ \$$ \$$ \$$$$$$
@iamcryptoki
iamcryptoki / backup_gnome_settings.txt
Last active July 6, 2020 11:32
Backup Gnome settings.
# Install dconf
$ sudo dnf install dconf
# Backup settings
$ cd ~
$ dconf dump /org/gnome/ > gnome_settings.dconf
# Restore settings
$ cd ~
dconf load /org/gnome/ < gnome_settings.dconf
@iamcryptoki
iamcryptoki / docker_k8s_command_args.txt
Created June 21, 2020 08:54
Command and Arguments field name for Docker and Kubernetes.
-------------------------------------------------------------------------------------
| Description | Docker field name | Kubernetes field name |
-------------------------------------------------------------------------------------
| The command run by the container | Entrypoint | command |
| The arguments passed to the command | Cmd | args |
-------------------------------------------------------------------------------------
@iamcryptoki
iamcryptoki / dell-xps-9380.md
Created June 20, 2020 08:52 — forked from netsensei/dell-xps-9380.md
Installing Fedora 30/31 on Dell XPS 13 9380

Installing Fedora 30/31 on a Dell XPS 13 9380 series in dual boot mode

This guide describes how to install Fedora 30/31 next to Windows 10 on a Dell XPS 13 9380 series in dual boot.

  • Keep the stock Windows 10 installation that came with the laptop.
  • Install Fedora 30 alongside Windows on the hard disk.
  • Install GRUB as the bootloader allowing you to choose which OS to boot from.

Authored: September 2019

@iamcryptoki
iamcryptoki / docker_remove_exited_containers.txt
Created May 5, 2020 07:10
Remove all Exited Docker containers
sudo docker ps -a | grep Exit | cut -d ' ' -f 1 | xargs sudo docker rm
@iamcryptoki
iamcryptoki / latency.txt
Created April 30, 2020 07:30 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@iamcryptoki
iamcryptoki / install_kubectx_kubens_linux.txt
Created March 2, 2020 14:32
Install kubectx and kubens on Linux.
sudo git clone https://github.com/ahmetb/kubectx /opt/kubectx
sudo ln -s /opt/kubectx/kubectx /usr/local/bin/kubectx
sudo ln -s /opt/kubectx/kubens /usr/local/bin/kubens
echo "source /opt/kubectx/completion/kubectx.bash" >> ~/.bashrc
echo "source /opt/kubectx/completion/kubens.bash" >> ~/.bashrc
@iamcryptoki
iamcryptoki / docker_delete_all_images.txt
Created January 25, 2020 14:53
Delete all your Docker images.
$ docker rmi $(docker images -q) -f
@iamcryptoki
iamcryptoki / kubernetes_copy_secret_namespace.txt
Last active January 15, 2020 08:10
Kubernetes: Copy secret data between namespaces.
$ kubectl get secret <SECRET_NAME> --namespace=<NAMESPACE> --export -o yaml | \
kubectl apply --namespace=<NEW_NAMESPACE> -f -
@iamcryptoki
iamcryptoki / add_label_workers.txt
Created January 14, 2020 12:50
Add "worker" as node role label to your Kubernetes workers.
$ kubectl label node <NODE_NAME> node-role.kubernetes.io/worker=worker