Skip to content

Instantly share code, notes, and snippets.

View yradunchev's full-sized avatar

Yordan Radunchev yradunchev

View GitHub Profile

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
@yradunchev
yradunchev / archlinux_gnupg_yubikey_guide.md
Created October 21, 2020 19:20 — forked from fervic/archlinux_gnupg_yubikey_guide.md
GnuPG offline Master key using a YubiKey (for Arch Linux)

GnuPG offline Master key using a YubiKey (for Arch Linux)

Introduction

This guide is a compilation of four other guides. It instructs how to create a set of GnuPG keys which the master key is offline and the actual subkeys only live inside your YubiKey (acting as a smartcard). What ends up in your (online) daily machine are only the stubs of the subkeys.

Install required software

@yradunchev
yradunchev / sort-tabs.txt
Created May 24, 2020 12:30 — forked from bpmore/sort-tabs.txt
Sort Tabs in Google Spreadsheets
1. Copy/Paste the information below to the clipboard
2. Open the spreadsheet whose sheets need to be alphabetised
3. Choose Tools > Script editor > Blank (this opens a new tab in the browser)
4. Press Control+A followed by Control+V copy and paste the script in
5. Press Control+S to save the script
6. Choose Run > sortSheets
7. Go back to the spreadsheet tab to view the new sorted tab order
--Copy everything below this line--
function sortSheets () {
@yradunchev
yradunchev / ffmpeg_generate_frequencies.sh
Created May 5, 2020 04:14 — forked from joachimesque/ffmpeg_generate_frequencies.sh
get ffmpeg to generate an animation of the frequencies of an audio file on top of a static image, useful for podcasts and such
ffmpeg -i test.wav -y -loop 1 -i bg.jpg -filter_complex \
"[0:a]showfreqs=cmode=separate:mode=bar:ascale=cbrt:fscale=log:s=600x600:colors=#ffffff[tmp]; \
[tmp]alphaextract,format=yuv420p,split=3[box][up][down]; \
[up]crop=in_w:in_h/2:0:0[up]; \
[down]crop=in_w:in_h/2:0:in_h/2,vflip[down];[up][down]vstack[tmp]; \
[tmp]gblur=sigma=10,curves=master='0/0 0.49/0 0.51/1 1/1',format=rgba[tmp]; \
[box]drawbox=w=600:h=600:c=#ffffff:t=fill:replace=1,format=rgba[box]; \
[box][tmp]alphamerge[tmp]; \
[tmp]crop=in_w:in_h/2:0:in_h/4[tmp]; \
[1:v]scale=1280:-1,crop=in_w:720[bg]; \
@yradunchev
yradunchev / Convert audio to video with ffmpeg - examples.md
Created May 1, 2020 06:51 — forked from CannonballSkippy/Convert audio to video with ffmpeg - examples.md
A list of examples on how you can use filters to make visual representations of audio using ffmpeg

Convert audio to video with ffmpeg - examples

ffmpeg -i input.mp3 -filter_complex "[0:a]avectorscope=s=1920x1080,format=yuv420p[v]" -map "[v]" -map 0:a avectorscope.mp4
ffmpeg -i input.mp3 -filter_complex "[0:a]showcqt=s=1920x1080,format=yuv420p[v]" -map "[v]" -map 0:a showcqt.mp4
ffmpeg -i input.mp3 -filter_complex "[0:a]ahistogram=s=1920x1080,format=yuv420p[v]" -map "[v]" -map 0:a ahistogram.mp4
@yradunchev
yradunchev / Podcast-Checklist.md
Last active September 15, 2022 13:36 — forked from pgburt/Podcast-Checklist.md
Audacity Podcast Checklist

Recording

  • Ensure you're recording in 16-bit PCM + 44100Hz.
  • Do a sound check, record everyone in the room speaking. You want the lighter part of the meter bar (the green or red bar at the top) to bounce between -12db and -6db while people are talking. It's hard to achieve this... so just settle for as close as you can get, without the bars going off the scale :)
  • Play it back and tweak levels until it sounds good @ 60% speaker volume.
  • Save the Project BEFORE recording live :D (prevents quality issues)

Edit for Content

  • Join recordings to one track.
  • Listen to it + Edit bad content out.
  • Save this copy to Google Drive, or another backup spot.
@yradunchev
yradunchev / Ledger_3_commands.dat
Created April 17, 2018 19:11 — forked from agaviria/Ledger_3_commands.dat
Collection of ledger-cli commands
# comments example for .dat or .ledger files
@smallexample
; This is a single line comment,
# and this,
% and this,
| and this,
* and this.
# If you have a deeply nested tree of accounts,
# it may be convenient to define an alias, for example: