Skip to content

Instantly share code, notes, and snippets.

View arvati's full-sized avatar
💭
Studying online

Ademar Arvati arvati

💭
Studying online
View GitHub Profile
@arvati
arvati / Build single kernel module in tree.md
Last active June 28, 2024 19:30
Build single kernel module in tree
sudo apt install build-essential libncurses-dev linux-headers-amd64 linux-source
cd /usr/src/
tar xf linux-source-4.19.tar.xz 
cd linux-source-4.19
cp ../linux-headers-4.19.0-9-amd64/Module.symvers .
cp /boot/config-4.19.0-9-amd64 ./.config # copy from boot folder
make oldconfig # it copies .config to ./
nano .config # enable module, ex: CONFIG_FT1000=m
make menuconfig # to confirm
@arvati
arvati / Barcode Contents.md
Last active June 25, 2020 14:00
Barcode Contents

Barcode Contents

What is the format of what the 2D barcode itself (QR Code, Data Matrix, and so on) encodes?

2D barcodes encode text, generally, but that text can represent many things.
Commonly, 2D barcodes encode text that represents a URL, like https://github.com/arvati. This is a special string of text since it is recognizable as a URL by readers, and therefore can be acted upon: the reader can open the URL in a browser.

2D barcodes can encode many types of actionable text. Text representing contact information, when recognized, could trigger a prompt to add the contact to an address book. But this only works when readers understand that text encodes contact information. For this, we need standards too.

There are some standards -- de facto and otherwise -- already in use. This gist attempts to catalog some possible standards for encoding various types of information, as seen at https://github.com/zxing/zxing/wiki/Barcode-Contents

@arvati
arvati / screen.md
Created June 20, 2020 17:14 — forked from fredrick/screen.md
GNU Screen Cheat Sheet

#GNU Screen Cheat Sheet

##Basics

  • ctrl a c -> cre­ate new win­dow
  • ctrl a A -> set win­dow name
  • ctrl a w -> show all win­dow
  • ctrl a 1|2|3|… -> switch to win­dow n
  • ctrl a " -> choose win­dow
  • ctrl a ctrl a -> switch between win­dow
  • ctrl a d -> detach win­dow
@arvati
arvati / Build Slim Openwrt Rootfs for docker.md
Last active June 18, 2020 01:02
Build Slim Openwrt Rootfs for docker

Build Slim Openwrt Rootfs for docker

TODO: choose another docker container

sudo docker container run -it openwrtorg/sdk:x86-64-master
sed -i '/src-git/s/^#//' /home/build/openwrt/feeds.conf.default
/home/build/openwrt/scripts/feeds update -a
/home/build/openwrt/scripts/feeds install -a
wget https://downloads.openwrt.org/snapshots/targets/x86/64/config.buildinfo -O .config
make defconfig 

SMBNetFS

Install and setup

sudo apt-get install smbnetfs
mkdir ~/.smb
cp /etc/smbnetfs/smbnetfs.conf ~/.smb
cp /etc/samba/smb.conf ~/.smb
@arvati
arvati / install docker into debian buster.md
Last active June 16, 2020 18:37
Install docker into debian Buster

Install docker into debian Buster

link: https://linuxize.com/post/how-to-install-and-use-docker-on-debian-10/

Installing

sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg2
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
sudo apt update
sudo apt install docker-ce
@arvati
arvati / self-signed-certificate-with-custom-ca.md
Created June 11, 2020 20:13 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@arvati
arvati / Alpine chroot btfrs grub2 install.md
Last active October 22, 2023 11:53
Install Alpine linux using chroot method and btrfs rootfs using grub2 for booting

Alpine chroot btfrs grub2 install

Mount root subvolume

mount -t btrfs -o subvolid=5,noatime,nodiratime,noacl,nossd 'UUID=68706ead-a626-4209-b3d0-1187b835f803' /mnt/btrfs
mount -o remount,exec /mnt/btrfs

List BTRFS subvolumes

btrfs subvolume list -t --sort=path /mnt/btrfs
@arvati
arvati / create and manage BTRFS snapshots.md
Last active October 22, 2023 11:53
Create and Manage Btrfs Snapshots

Create and Manage Btrfs Snapshots

Mount root subvolume

mount -t btrfs -o subvolid=5,noatime,nodiratime,noacl,nossd 'UUID=68706ead-a626-4209-b3d0-1187b835f803' /mnt/btrfs

List BTRFS subvolumes

btrfs subvolume list -t --sort=path /mnt/btrfs
ID      gen     top level       path
--      ---     ---------       ----
@arvati
arvati / copy subversion repos locally.md
Last active May 30, 2020 15:28
copy subversion repos locally

Copy subversion repos locally

Create local server

svnadmin --version
sudo svnadmin create /srv/svn/edifast
sudo chmod -R g+rws /srv/svn/
cd /srv/svn/
sudo find -type d -exec chmod g+s {} + 

Make then use the same UUID. First look info at remote server