Skip to content

Instantly share code, notes, and snippets.

View yradunchev's full-sized avatar

Yordan Radunchev yradunchev

View GitHub Profile
@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 / togglevpn
Last active October 17, 2020 06:49
ShrewSoft VPN Client command line switch on/off
#!/bin/bash
# uses https://github.com/jonhoo/mktrayicona to add tray icon
PID=$(pgrep ikec)
SITENAME=SITENAME
VPNUSER=USERNAME
VPNPASS=PASSWORD
LOG=$HOME/.vpn.out
ERR=$HOME/.vpn.err
@yradunchev
yradunchev / splitsecrets
Created July 18, 2020 06:02
Split secret using ssss and QR
#!/bin/bash
strsplits=($(ssss-split -t 3 -n 5 -s 256 -Q <<< ${1}))
for (( i=0; i<=$(( ${#strsplits[*]} -1 )); i++ ))
do
qrencode -o key_${i}.png ${strsplits[$i]}
done
@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 / tfg_calf
Last active October 20, 2019 07:01
tfg tracking settings
<?xml version="1.1" encoding="utf-8"?>
<rack><plugin type="mono" instance-name="Mono Input" input-index="1" output-index="1">
<preset bank="0" program="0" plugin="mono" name="">
<param name="bypass" value="0" />
<param name="level_in" value="1" />
<param name="level_out" value="1" />
<param name="meter_in" value="0" />
<param name="meter_outL" value="0" />
<param name="meter_outR" value="0" />
<param name="clip_in" value="0" />
@yradunchev
yradunchev / README.md
Last active October 9, 2019 03:43
chapter podcast episode

id3tags.txt:

;FFMETADATA1
title="Title"
artist=Artist
album_artist=Artist
album=Album
copyright=Copyright 2019
track=01

genre=(186)

# Creating a system sound monitor
pcm.pulse_monitor {
type pulse
device alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
}
ctl.pulse_monitor {
type pulse
device alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
}
@yradunchev
yradunchev / archdaw.md
Last active March 28, 2020 06:42
Arch DAW

Sudoers

pacman -S sudo

Use sed to uncomment the wheel group from sudoers, then hijack the EDITOR variable to copy the modified version back via visudo.

sed 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' /etc/sudoers > /etc/sudoers.new
EDITOR="cp /etc/sudoers.new" visudo

rm /etc/sudoers.new