Skip to content

Instantly share code, notes, and snippets.

View yradunchev's full-sized avatar

Yordan Radunchev yradunchev

View GitHub Profile
@yradunchev
yradunchev / extract.md
Created June 15, 2023 09:33
Extract Links from Web Page

Open Google Chrome Developer Tools with Cmd + Opt + i (Mac) or F12 (Windows).
Click on the Console tab.
Copy-Paste the following JavaScript code and press Enter.

const results = [
    ['Url', 'Anchor Text', 'External']
];
var urls = document.getElementsByTagName('a');
for (urlIndex in urls) {
Mountains:
==========
balkan
belasitsa
chernagora
erul
ezdimir
golobardo
greben
sudo apt install libncurses5-dev \
libatk1.0-dev \
libcairo2-dev python-dev \
python3-dev git
sudo apt remove vim vim-runtime gvim
cd /usr && sudo git clone https://github.com/vim/vim.git && cd vim
sudo ./configure --with-features=huge --enable-multibyte --enable-pythoninterp=yes --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu/ --enable-python3interp=yes --with-python3-config-dir=/usr/lib/python3.9/config-3.9-x86_64-linux-gnu/ --enable-cscope --prefix=/usr/local
@yradunchev
yradunchev / mikrotik wg vpn
Last active April 30, 2023 13:20
mikrotik wg vpn
/interface wireguard add listen-port=51820 mtu=1420 name=vpn
/interface wireguard peers add allowed-address=0.0.0.0/0 comment=vpn-peer endpoint-address=<replace_with_vpn_server_ip> \
endpoint-port=51820 interface=vpn persistent-keepalive=25s \
public-key="<replace_with_endpoint_public_key>"
/ip address \
add address=<replace_with_vpn_client_address> interface=vpn network=<replace_with_vpn_client_address>
/ip firewall nat \
@yradunchev
yradunchev / reaper.pacmanity
Last active July 24, 2023 04:51
reaper: List of installed packages
a2jmidid
a52dec
aalib
abseil-cpp
accountsservice
acl
acpi
acpi_call
adlplug
adlplug-lv2
@yradunchev
yradunchev / .dot_testsite
Last active July 16, 2022 05:46
Get https respond times.
alias testsite="curl -L -s -w '\nTesting Website Response Time for: %{url_effective}\n
Lookup Time:\t\t%{time_namelookup}
Connect Time:\t\t%{time_connect}
AppCon Time:\t\t%{time_appconnect}
Redirect Time:\t%{time_redirect}
Pre-transfer Time:\t%{time_pretransfer}
Start-transfer Time:\t%{time_starttransfer}\n
Total Time:\t\t%{time_total}\n' -o /dev/null $1"

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@yradunchev
yradunchev / iptables-ddos-protection.txt
Created October 10, 2021 05:52 — forked from peerapach/iptables-ddos-protection.txt
Build Your Own DDoS Protection With Linux & IPtables
DEV=eth0
PORT=80
### Use SYNPROXY ###
/sbin/iptables -t raw -A PREROUTING -i $DEV -p tcp -m tcp --syn --dport $PORT -j CT --notrack
/sbin/iptables -t mangle -A INPUT -i $DEV -p tcp -m conntrack --ctstate INVALID,UNTRACKED --dport $PORT -j SYNPROXY \
--sack-perm --timestamp --wscale 7 --mss 1460
/sbin/iptables -t mangle -A INPUT -i $DEV -p tcp -m conntrack --ctstate INVALID --dport $PORT -j DROP
@yradunchev
yradunchev / README.md
Created September 17, 2021 06:23 — forked from arturokunder/README.md
Verify APK signature

Do I have the correct certificate to sign my APK?

Use keytool Keytool is part of Java, so make sure your PATH has Java installation dir in it.

Get APK Certificate Signature

First, unzip the APK and extract the file /META-INF/ANDROID_.RSA (this file may also be CERT.RSA or something.RSA, but there should only be one .RSA file).

Then, run:

@yradunchev
yradunchev / sources.list
Created April 8, 2021 04:14 — forked from josephlr/sources.list
/etc/apt/sources.list for Ubuntu Bionic 18.04
deb [arch=amd64,i386] http://us.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
deb [arch=amd64,i386] http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse
deb [arch=amd64,i386] http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb [arch=amd64,i386] http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
deb [arch=arm64,armhf,ppc64el,s390x] http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe multiverse
deb [arch=arm64,armhf,ppc64el,s390x] http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe multiverse
deb [arch=arm64,armhf,ppc64el,s390x] http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted universe multiverse
deb [arch=arm64,armhf,ppc64el,s390x] http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse