Skip to content

Instantly share code, notes, and snippets.

View neklaf's full-sized avatar
👟
Learning by doing

Aitor Acedo neklaf

👟
Learning by doing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am neklaf on github.
  • I am aitoracedo (https://keybase.io/aitoracedo) on keybase.
  • I have a public key ASBlveiCDrqNFEj8FzQfDB7w8s5L6zMykvx7pK6ycaTRXAo

To claim this, I am signing this object:

@neklaf
neklaf / gist:9300e5e87af675d2b6f211e5bd36426b
Created June 15, 2018 21:13
Command to find the status of local repositories in the workspace directory
$ cd WORKSPACE_DIRECTORY; for i in `find . -maxdepth 1 -type d `; do echo "$i"; git -C $i status -s; done;
@neklaf
neklaf / config.sh
Last active February 9, 2020 07:38
Script to setup packages needed to install a K8s node v 1.15.00
#!/bin/sh
sudo apt update && sudo apt upgrade
sudo apt install -y docker.io curl sudo vim
sudo cat > /etc/docker/daemon.json <<EOF
{
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
@neklaf
neklaf / create-vm
Created November 24, 2019 20:39
Script to create a VM based on Debian GNU/Linux v10.1.0 (debian-10.1.0-amd64-netinst.iso)
#!/bin/sh
if [ -z "$1" ] ;
then
echo Specify a VM name.
exit 1
fi
virt-install \
--name $1 \
--ram 4096 \
--disk path=/your/path/images/$1.img,size=10 \
@neklaf
neklaf / etc-default-keyboard
Created January 6, 2020 20:21
Logitech k400r keyboard configuration on Raspbian
XKBMODEL="pc105"
XKBLAYOUT="es"
XKBVARIANT=""
XKBOPTIONS=""
BACKSPACE="guess"
@neklaf
neklaf / lower.sh
Created February 1, 2020 10:18
Rename files to lowercase
#!/bin/sh
if [ -z "$1" ] ;
then
printf "Specify a directory name.\n"
exit 1
fi
sudo apt update && apt install rename
find $1 -depth -exec rename 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \;
@neklaf
neklaf / config_k8s_node.sh
Created February 10, 2020 00:17
Script to setup packages needed to install a K8s node v 1.17.00
#!/bin/bash
# Some auxiliar packages will be installed using cloud-init configuration
#KUBE_VERSION=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)
K8S_VERSION=v1.17.0
printf "Installing cfssl cfssljson...\n"
wget -q --show-progress --https-only --timestamping \
https://storage.googleapis.com/kubernetes-the-hard-way/cfssl/linux/cfssl \
https://storage.googleapis.com/kubernetes-the-hard-way/cfssl/linux/cfssljson
@neklaf
neklaf / config_k8s_node.sh
Created February 10, 2020 00:17
Script to setup packages needed to install a K8s node v 1.17.00
#!/bin/bash
# Some auxiliar packages will be installed using cloud-init configuration
#KUBE_VERSION=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)
K8S_VERSION=v1.17.0
printf "Installing cfssl cfssljson...\n"
wget -q --show-progress --https-only --timestamping \
https://storage.googleapis.com/kubernetes-the-hard-way/cfssl/linux/cfssl \
https://storage.googleapis.com/kubernetes-the-hard-way/cfssl/linux/cfssljson
@neklaf
neklaf / collab.md
Last active October 22, 2024 06:02
How to collaborate with a GitHub project

How to collaborate in a GitHub project:

  • Review collaboration policy in the project
  • Fork the repo
  • Clone forked repo
  • Update master branch
  • Create a branch - Make our improvements
  • Create a pull request
  • Sync a fork
  • Rebasing a pull request
@neklaf
neklaf / docker.md
Last active May 3, 2020 09:11
Some useful docker commands

Allow non-priviledged user run docker commands

# usermod -aG docker ${USER}

Stop and remove all docker containers

docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker rm $(docker ps -a -q -f status=exited)