Skip to content

Instantly share code, notes, and snippets.

Prepare folders, image extraction and user

Create folder and change directory

mkdir vw-image
cd vw-image

Download docker-image-extract

wget https://raw.githubusercontent.com/jjlin/docker-image-extract/main/docker-image-extract

IPXE 101

  • Clone project and resources
git clone https://github.com/pypxe/PyPXE
git clone https://github.com/ipxe/ipxe.git
pip3 install pypxe
  • Install requirements
apt install liblzma-dev
  • Find files of today and rsync them to a folder
find ./ -daystart -ctime 0 -print0 | xargs -0 -I{} rsync -avr {} /tmp/blabla/
  • Find files and rename them with regex
find . -type f | perl -pe 'print $_; s/input/output/' | xargs -d "\n" -n2 mv
  • Rename all files named with this convention 'YYYYMMDD.md' to 'YYYY_MM_DD.md'
@vpnwall-services
vpnwall-services / python3_12_debian_bullseye_101.md
Created June 24, 2024 15:51
PYTHON 3.12 Debian Bullseye 101
find . ! -name 'file.txt' -type f -exec rm -f {} +

Disabled phony services

sudo systemctl --global mask tracker-miner-fs-3.service
sudo systemctl --global mask tracker-xdg-portal-3.service
sudo apt remove tracker tracker-extract tracker-miner-fs
@vpnwall-services
vpnwall-services / FILESHARE-101.md
Created February 20, 2024 09:27
[FILESHARE 101] Fileshare 101 #linux #debian #nfs #rpcbind #shareing #file #share

FILESHARE 101

  • Install packages
apt install nfs-common rpcbind nfs-kernel-server -y
  • Add share in /etc/exports
@vpnwall-services
vpnwall-services / TELEGRAM-BOT-101.md
Last active April 21, 2024 21:28
[Telegram Bot 101] Telegram Bot 101 #bash #telegram #bot #101
  • Install telegram on desktop
  • Message @botfather and then /newbot (give name, and other things)
  • Create new channel and add the bot
  • Get channel ID
curl -L https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/getUpdates
  • Add to .bashrc
@vpnwall-services
vpnwall-services / FILEBEAT-101.md
Last active January 24, 2024 14:06
[FILEBEAT 101] Filebeat 101 #filebeat #linux #101
@vpnwall-services
vpnwall-services / LOGSTASH-101.md
Last active April 21, 2024 21:29
[LOGSTASH 101] Logstash 101 #logstash #linux #debian

LOGSTASH 101

  • Debug pipeline:
input {
  pipeline {
    address => apache2
 }