Skip to content

Instantly share code, notes, and snippets.

View vpnwall-services's full-sized avatar

Vpnwall Services vpnwall-services

View GitHub Profile
@vpnwall-services
vpnwall-services / ENCRYPT-DECRYPT-101.md
Last active March 27, 2024 16:35
[ENCRYPT DECRYPT 101] Encrypt Decrypt 101 #bash #python #encrypt #decrypt #101

ENCRYPT-DECRYPT-101

  • GPG

Make GPG read input from tty instead of GUI

export GPG_TTY=$(tty)

Encrypt

tar -cvzf - folder | gpg -c > folder.tar.gz.gpg

Decrypt

gpg -d folder.tar.gz.gpg | tar -xvzf -

@vpnwall-services
vpnwall-services / VIM-101.md
Last active March 21, 2024 17:22
[VIM 101] VIM Cookbook with helpfuls Vim common commands #index #book #vim #help #cookbook #comment #replay #macro

VIM 101 - VIM Cookbook - Helpful commands

  • Replace all contiguous spaces with a ; s/ \{2,}/ /g

  • Vim replay macro until end of buffer VG:normal @x

  • Consecutive SED

@vpnwall-services
vpnwall-services / GIT-101.md
Last active March 21, 2024 15:12
[GIT 101] GIT COOKBOOK #force #untrack #unrelated #multithread #cleaning #pruning #housekeeping #less

GIT 101 - GIT Cookbook - Helpful commands

  • Crete branch, work, merge and delete
git checkout -b user/fix
echo fart >> new_file
git checkout master
git merge user/fix
git push -u origin master
@vpnwall-services
vpnwall-services / REPOS-LINUX.md
Created April 26, 2019 14:28
[REPOS LINUX] Repos Linux #repo #list #linux
  • Debian Wheezy deb http://archive.debian.org/debian wheezy main
@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 February 18, 2024 14:44
[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 / ELASTICSEARCH-101.md
Last active February 14, 2024 10:11
[ELASTICSEARCH 101] Elasticsearch 101 #bash #curl #elasticsearch #101
@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
Created January 24, 2024 12:56
[LOGSTASH 101] Logstash 101 #logstash #linux #debian

LOGSTASH 101

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