Skip to content

Instantly share code, notes, and snippets.

Avatar

Babatunde Adeyemi barbietunnie

View GitHub Profile
@barbietunnie
barbietunnie / go-stdlib-compile-error.sh
Created May 11, 2022
Fix: stdlib.h compile error (Mac)
View go-stdlib-compile-error.sh
# To fix the error, set the folowing environment variables on your Mac before compilation
export CGO_ENABLED=1
export CC=gcc
# Sample compilation
go build -o docker-bench
@barbietunnie
barbietunnie / delete-stuck-pod.md
Created May 9, 2022
How to delete a running pod stuck in termination state
View delete-stuck-pod.md

How to delete a running pod stuck in termination state

kubectl delete pod --grace-period=0 --force --namespace [NAMESPACE] [POD_NAME]
View uninstall-all-packages.sh
pip freeze > requirements.txt
pip uninstall -r requirements.txt -y
# alternatively, you can use a single command
pip uninstall -y -r <(pip freeze)
@barbietunnie
barbietunnie / m1-arch-switch.sh
Created Apr 26, 2022
Easily switch from Apple M1 Silicon to Rosetta Intel Emulator
View m1-arch-switch.sh
# Switch from Apple M1 Silicon to Rosetta Intel Emulator (add to your ~/.zshrc)
alias arm="env /usr/bin/arch -arm64 /bin/zsh --login"
alias intel="env /usr/bin/arch -x86_64 /bin/zsh --login"
View ports-in-use.sh
sudo lsof -i -P -n | grep LISTEN
@barbietunnie
barbietunnie / k3s-config-load-error.md
Created Apr 10, 2022
Fix: error loading config file "/etc/rancher/k3s/k3s.yaml": open /etc/rancher/k3s/k3s.yaml: permission denied
View k3s-config-load-error.md

How to fix: error loading config file "/etc/rancher/k3s/k3s.yaml": open /etc/rancher/k3s/k3s.yaml: permission denied

  1. Change file permissions
sudo chmod 644 /etc/rancher/k3s/k3s.yaml
  1. Re-install k3s or start server modified kube config permissions
View setup-pyenv-ubuntu-20.md

Setup pyenv in Ubuntu 20

  1. Check if curl is installed:
curl --version

If it is not installed, install as follows:

@barbietunnie
barbietunnie / lightweight-gsutil.md
Created Mar 30, 2022
Set up lightweight `gsutil` without installing entire Google Cloud CLI SDK on Mac OSX
View lightweight-gsutil.md

Set up lightweight gsutil without installing entire Google Cloud CLI SDK

Installing from tar or zip archive [source]

  1. Download archive

    wget https://storage.googleapis.com/pub/gsutil.tar.gz
    
@barbietunnie
barbietunnie / unauthenticated-git-protocol-fix.md
Created Mar 22, 2022
The unauthenticated git protocol on port 9418 is no longer supported fix
View unauthenticated-git-protocol-fix.md
git config --global url."https://".insteadOf git://
@barbietunnie
barbietunnie / pipenv-error-fix.md
Last active Mar 22, 2022
Pipenv environment variable LANG is not set fix!
View pipenv-error-fix.md

$ sudo nano ~/.bash_profile

export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"