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
@neklaf
neklaf / disk_format_macos.md
Last active August 30, 2020 19:21
How to format a disk to write content on macOS from command line

Format an external hard drive from command line on macOS

Using the following command you're able to share the content inside the external disk with other Operating Systems, because we are going to create a partition with ExFAT (better write performance on macOS than NTFS):

$ diskutil eraseDisk ExFAT CleanDrive /dev/disk2
Started erase on disk2
Unmounting disk
Creating the partition map
Waiting for partitions to activate

#Effective Communication


Prepare the conversation.

  • Why are we having this conversation?
    Your time is valuable, other people's time is valuable. If you need to use this time, the least you can do is to prepare it. Things such as "what do you want to achieve?", "What info you need to give?", and all following...
  • What do you expect from the meeting?
    How many times do you go to a meeting without thinking what's the outcome you want from it?
  • Try to understand the audience.:
  • How can I get to my audience better?.
@neklaf
neklaf / deepfacelab.md
Last active May 24, 2020 15:40
Deepfacelab

Installation instructions (to Debian GNU/Linux)

Anaconda installation

https://www.anaconda.com/products/individual#linux

Download Anaconda3-2020.02-Linux-x86_64.sh from Anaconda download page for Linux:

$ chmod u+x Anaconda3-2020.02-Linux-x86_64.sh
$ ./Anaconda3-2020.02-Linux-x86_64.sh
$ export PATH=~/anaconda3/bin:$PATH
@neklaf
neklaf / install-kubernetes-archlinux.md
Created May 2, 2020 07:13 — forked from StephenSorriaux/install-kubernetes-archlinux.md
Install Kubernetes on bare-metal ArchLinux host

Installing Kubernetes on ArchLinux

Packages

pacman -S curl docker ebtables ethtool wget unzip

Also cfssl is needed but available on AUR, using pacaur

pacaur -S cfssl
@neklaf
neklaf / unattended-upgrades.md
Last active May 1, 2020 14:37
Managing unattended upgrades in Debian GNU/Linux

Install

# apt install unattended-upgrades

Enable

$ grep -v -e "//" /etc/apt/apt.conf.d/50unattended-upgrades
Unattended-Upgrade::Origins-Pattern {
 "origin=Debian,codename=${distro_codename},label=Debian";
@neklaf
neklaf / debian_repack.md
Last active April 29, 2020 09:21
Modifying and repack a Debian GNU/Linux package

Creating directory structure

$ mkdir -p newdeb olddeb/DEBIAN

Extracting package content:

$ dpkg-deb -x libapache2-mod-auth-openidc_2.4.1-1.buster+1_amd64.deb olddeb/

Extract control information files

$ dpkg-deb -e libapache2-mod-auth-openidc_2.4.1-1.buster+1_amd64.deb olddeb/DEBIAN

Checking package directory structure

@neklaf
neklaf / changing_dns.md
Last active July 19, 2022 09:44
Modifying DNS on macOS from command line

A non persistent way across reboots to change the DNS:

# scutil
> open
> d.init
> d.add ServerAddresses * 8.8.8.8 9.9.9.9
> set State:/Network/Service/PRIMARY_SERVICE_ID/DNS
> quit

To check the change:

@neklaf
neklaf / cmus.md
Last active January 17, 2021 12:49
CMUS documentation on macOS

CMUS

CMUS is a ncurses-based audio player which is very configurable with Vi-like commands.

Installation

$ brew install cmus

Adding a folder to our Library

:add /path/to/folder/

Save a playlist

@neklaf
neklaf / docker_image_layers_content.md
Last active March 19, 2020 21:23
Inspecting a docker image

Pull the docker image to inspect and save it as a tar file:

docker pull gcr.io/distroless/base-debian10:latest`
docker image save gcr.io/distroless/base-debian10:latest > distroless.tar
mkdir distroless && cd distroless
tar xvf distroless.tar
x 0032743b1e18b361a1fd10656b43c18ec1704ec372242f4baf40b06364fb6c49/
x 0032743b1e18b361a1fd10656b43c18ec1704ec372242f4baf40b06364fb6c49/VERSION
x 0032743b1e18b361a1fd10656b43c18ec1704ec372242f4baf40b06364fb6c49/json
x 0032743b1e18b361a1fd10656b43c18ec1704ec372242f4baf40b06364fb6c49/layer.tar
@neklaf
neklaf / static_networking.md
Last active March 14, 2020 11:38
Setup my static network configuration at home on macOS X

List all network services

networksetup -listallnetworkservices An asterisk (*) denotes that a network service is disabled. USB 10/100/1000 LAN USB 10/100/1000 LAN 2 USB 10/100/1000 LAN 3 USB 10/100/1000 LAN 4 USB 10/100/1000 LAN 5 Wi-Fi