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:19c9ca88d77ad81d10012fe1830a341d
Last active January 10, 2021 03:42
raspberry pi boot from USB
  1. Boot from a standard microSD card with the latest Raspberry Pi OS on it.

  2. Update your OS and firmware by typing:

sudo apt update
sudo apt full-upgrade
sudo rpi-update
@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 / sample.html
Created August 30, 2020 05:18
basic microdata
<!DOCTYPE html>
<html lang="es">
<head>
<title>Mazda Ekiden</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="A Meaningful and short description">
<meta property="og:title" content="Title" />
<meta property="og:url" content="https://www.page.mx" />
<meta property="og:description" content="Evento deportivo">
@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 / 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 / .vimrc
Last active June 13, 2020 06:24
basic vimrc
syntax on
filetype plugin indent on
set swapfile
set dir=/tmp
set nu
set expandtab ts=4 sw=4 ai
let mapleader=","
imap ,w <ESC>:w<CR>
imap jj <ESC>
nnoremap <Leader>w :w<CR>