Skip to content

Instantly share code, notes, and snippets.

@alopatindev
alopatindev / remove-youtube-country.js
Last active January 29, 2025 12:35
Remove Youtube Country code Violentmonkey script
// Installation:
// 1. https://violentmonkey.github.io/
// 2. ⚙️ Open Dashboard
// 3. Install from URL => https://gist.githubusercontent.com/alopatindev/ad9cbd4bdc37ee27767860438c002e62/raw
// ==UserScript==
// @name Remove Youtube Country
// @version 0.0.1
// @author alopatindev
// @license MIT
@alopatindev
alopatindev / build_aquatic_ws.sh
Last active October 25, 2024 03:58
Build aquatic_ws using Alpine Linux podman container
#!/usr/bin/env sh
if [ $# -lt 3 ] ; then
echo "Build aquatic_ws using Alpine Linux podman container"
echo "Usage: $0 <aquatic_version> <alpine_version> <target_cpu>
$0 0.9.0 3.20.3 native
$0 0.9.0 3.20 \$(ssh REMOTE_HOST 'rustc --print target-cpus' | grep native | sed 's!.* (currently !!;s!)\\.!!')"
exit 1
fi
Verifying that I control the following Nostr public key: npub1alptdev5srcw2hxg03567p4k6xs3lgj7f6545suc0rzp0xw98svse7rg94

https://wiki.archlinux.org/title/DaVinci_Resolve

$ ffmpeg -i input.mp4 -c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv422p -c:a pcm_s16le -f mov output.mov

This causes a/v desync for me (15 min video). In case if anybody runs into the same, here's the solution:

ffmpeg -threads 16 -fflags '+genpts+igndts' -i input.mp4 -c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv422p -af 'aresample=async=1,asetpts=PTS-STARTPTS' -c:a pcm_s16le -f mov output.mov
@alopatindev
alopatindev / awesome.svg
Created February 24, 2024 10:47
awesome.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// Installation:
// 1. https://violentmonkey.github.io/
// 2. ⚙️ Open Dashboard
// 3. Install from URL => https://gist.githubusercontent.com/alopatindev/e0e2acecc9fd78048f2c5f9057151a50/raw
// ==UserScript==
// @name Remove Youtube Popups
// @namespace https://violentmonkey.github.io/
// @version 0.0.1
// @description Stop attention stealing
@alopatindev
alopatindev / stacktrace.md
Created May 13, 2023 14:11
Audacity crash related to convolve and snd-avg

Stacktrace:

Thread 1 "audacity" received signal SIGSEGV, Segmentation fault.
avg_s_fetch (a_susp=0x5555586e4258, snd_list=0x5555586ea208) at /var/tmp/portage/media-sound/audacity-3.2.5-r1/work/audacity-Audacity-3.2.5/lib-src/libnyquist/nyquist/nyqsrc/avg.c:140
(gdb) bt
#0  avg_s_fetch (a_susp=0x5555586e4258, snd_list=0x5555586ea208)
    at /var/tmp/portage/media-sound/audacity-3.2.5-r1/work/audacity-Audacity-3.2.5/lib-src/libnyquist/nyquist/nyqsrc/avg.c:140
#1  0x000055555634c3c7 in SND_get_first (snd=0x5555586e7040, cnt=0x5555586e5a38)
    at /var/tmp/portage/media-sound/audacity-3.2.5-r1/work/audacity-Audacity-3.2.5/lib-src/libnyquist/nyquist/nyqsrc/sound.c:1093
#2  0x00005555563a78bf in offset_n_fetch (a_susp=0x5555586e59c8, snd_list=0x5555586ea1f0)
@alopatindev
alopatindev / Dark.user.js
Last active May 6, 2023 13:18 — forked from ChandanShakya/Dark.user.js
Greasemonkey / Violentmonkey userscript for day, evening and night color schemes
// ==UserScript==
// @name Dark Reader (Unofficial)
// @icon https://darkreader.org/images/darkreader-icon-256x256.png
// @namespace DarkReader
// @description Inverts the brightness of pages to reduce eye strain
// @version 4.7.15
// @author https://github.com/darkreader/darkreader#contributors
// @homepageURL https://darkreader.org/ | https://github.com/darkreader/darkreader
// @run-at document-end
// @grant none
@alopatindev
alopatindev / upload.sh
Last active January 11, 2022 12:59
Upload specific music to Android device one-liner
IFS=$'\n' ; for i in $(ls --color=no -1 | grep -v Bone | grep -v Future) ; do adb push "$i" "/mnt/sdcard/Music/Steven_Wilson/$i" ; done
diff -ur /var/tmp/hostapd/hostapd/Android.mk ./Android.mk
--- /var/tmp/hostapd/hostapd/Android.mk 2021-08-13 23:32:56.873413502 +0300
+++ ./Android.mk 2021-08-13 23:22:08.955399008 +0300
@@ -4,7 +4,8 @@
ifneq ($(TARGET_SIMULATOR),true)
ifneq ($(BOARD_HOSTAPD_DRIVER),)
WPA_BUILD_HOSTAPD := true
- CONFIG_DRIVER_$(BOARD_HOSTAPD_DRIVER) := y
+ #CONFIG_DRIVER_$(BOARD_HOSTAPD_DRIVER) := y
+ CONFIG_DRIVER_RTW := y