Skip to content

Instantly share code, notes, and snippets.

View ratacibernetica's full-sized avatar

Martín Roldán-Araujo ratacibernetica

View GitHub Profile
@ratacibernetica
ratacibernetica / gist:f8f24f98e10b7546b3605e2ea9fc5c3f
Created August 17, 2020 04:12
VNC over reverse SSH connection
### Computer you're connection TO (server)
### Computer you're connecting FROM
#From Client
ssh -L 5903:localhost:5901 user@dpassthroughserver.tld -p34350
# VNC client connection
host: localhost: 5903
@ratacibernetica
ratacibernetica / ssh(slash)config
Created August 10, 2020 16:38
SSH onion sites
# file ~/.ssh/config
# nc command required
Host *.onion
CheckHostIP no
Compression yes
Protocol 2
ProxyCommand nc -X 5 -x 127.0.0.1:9050 %h %p
@ratacibernetica
ratacibernetica / ssh(slash)config
Created August 10, 2020 16:38
SSH onion sites
# file ~/.ssh/config
# nc command required
Host *.onion
CheckHostIP no
Compression yes
Protocol 2
ProxyCommand nc -X 5 -x 127.0.0.1:9050 %h %p
@ratacibernetica
ratacibernetica / agreement.md
Created July 21, 2020 23:50 — forked from tyler-smith/agreement.md
Moderation Agreement

OpenBazaar Moderation Agreement

Author Version Last Updated
Tyler Smith 0.1.0 2016-04-18

Based on the moderation policy of @serp.

Goal

@ratacibernetica
ratacibernetica / raid.md
Last active June 19, 2020 03:49
RAID in raspberry pi 4

assuming device is in /dev/sda1

sudo apt install mdadm
sudo mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=1 /dev/sda1
sudo mkdir -p /mnt/raid1
sudo mkfs.ext4 /dev/md0
sudo mount /dev/md0 /mnt/raid1/
ls -l /mnt/raid1/
sudo nano /etc/fstab
@ratacibernetica
ratacibernetica / how-to-mount.md
Created June 10, 2020 22:37
automatically mount network drives in linux

find the UUID with lsblk -o UUID,NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL,MODEL Make sure you create /home/pi/shared first.

#this is a network share with no authentication
//192.168.50.1/MACOZ-240 /mnt/shared cifs username=guest,password=,vers=1.0,_netdev 0 0

#this is a fat32 drive attached to USB
UUID=XYZ-123	/home/pi/shared	vfat	defaults,auto,users,rw,nofail,umask=000,x-systemd.device-timeout=3 0 0
@ratacibernetica
ratacibernetica / add-route-wan-lan-rpi.md
Last active June 15, 2020 01:21
add route from WAN to LAN raspberry PI

In linux sudo ip route add 192.168.50.0/24 via 192.168.15.2

In MacOS sudo route -n add -net 192.168.50.0/24 192.168.15.2

persist by adding the line above to

/lib/dhcpcd/dhcpcd-hooks/40-myroute

@ratacibernetica
ratacibernetica / download-musik.sh
Created May 31, 2020 19:49
Download YouTube audio only, best quality available
#!/bin/bash
VIDEO_URL=$@
echo "Downloading ${VIDEO_URL}\n"
youtube-dl -F $VIDEO_URL | grep "audio only" | sort -nr | awk 'NR==1{print $1}' | xargs -I{} youtube-dl -f {} $VIDEO_URL
@ratacibernetica
ratacibernetica / install.sh
Created May 23, 2020 23:19
install docker in Centos 8
sudo yum install -y yum-utils
sudo yum install docker-ce docker-ce-cli containerd.io
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io
sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf repolist -v
dnf list docker-ce --showduplicates | sort -r
sudo dnf -y install docker-ce --nobest
docker ps
sudo systemctl enable --now docker
@ratacibernetica
ratacibernetica / inbucket.sh
Last active May 12, 2020 02:12
Create a disposable email server like mailinator
#!/bin/bash
# Optional:
# add an A DNS record pointing to you server's IP address
# e.g, for mydomain.com, mail -> 127.0.0.1. Would be mail.mydomain.com
docker run -it --rm --name inbucket -p 9000:9000 -p 25:2500 -p 1100:1100 inbucket/inbucket