Skip to content

Instantly share code, notes, and snippets.

View vitali2y's full-sized avatar
🏠
/me @ home

Vitaliy Yermolenko vitali2y

🏠
/me @ home
  • $HOME @ Ukraine @ Earth
View GitHub Profile
@vitali2y
vitali2y / orange-pi-rv2-dmesg.md
Created May 2, 2025 20:53
dmesg output of Orange Pi RV2 SBC (Ubuntu Orangepirv2_1.0.0_ubuntu_noble_desktop_gnome_linux6.6.63.7z image from orangepi.org burned on SD Card)
[    0.000000] Linux version 6.6.63-ky (root@test) (riscv64-unknown-linux-gnu-gcc (g09b62c20e09) 13.2.1 20240423, GNU ld (GNU Binutils) 2.42) #1.0.0 SMP PREEMPT Wed Mar 12 09:04:00 CST 2025
[    0.000000] Machine model: ky x1 orangepi-rv2 board
[    0.000000] SBI specification v1.0 detected
[    0.000000] SBI implementation ID=0x1 Version=0x10003
[    0.000000] SBI IPI extension detected
[    0.000000] SBI RFENCE extension detected
[    0.000000] earlycon: sbi0 at I/O port 0x0 (options '')
[    0.000000] printk: bootconsole [sbi0] enabled
[    0.000000] efi: UEFI not found.
@vitali2y
vitali2y / scan-local-network.md
Created February 10, 2025 09:38
Scan all IPs connected to home network
➜  nmap -sn 192.168.1.1-254/24 | egrep "scan report" | awk '{print $5}'
OpenWrt.lan
vernee_m6.lan
greenway.lan
192.168.1.147
➜
@vitali2y
vitali2y / save-fb-video-in-two-steps.md
Created January 26, 2025 22:43
Save FB Video In Two Steps

Open FB video (for example walking on the water), then:

  1. open DevTools (F12), then Network tab, watch for calling two GET URLs one-by-one, each with .mp4 inside: first is video without audio, second is just audio (both you can Open in New Tab) - so do Copy As cURL for both, and execute them as below (assuming 1.mp4 and 1.mp3 for both video and audio correspondently):

    IMPORTANT: it's required to remove 2 HTML params from the end of URLs: &bytestart=XXX&byteend=YYY!

    curl --output 1.mp4 https://scontent.xx.fbcdn.net/o1/v/t2/f2/m69/AQO...Kq9.mp4\?strext\=1\&_nc_cat\=108\&_nc_sid\=...&oe\=679C6293
    curl --output 1.mp3 https://scontent.xx.fbcdn.net/o1/v/t2/f2/m69/AQP...HqV.mp4\?strext\=1\&_nc_cat\=1\&_nc_sid\=&oe\=679C8E9F
    
  2. merging downloaded 1.mp4 video and 1.mp3 audio into the final output.mp4 as below:

@vitali2y
vitali2y / remove_html_tags_sed.md
Created January 22, 2025 09:25
Remove HTML Tags Sed

Below is a one liner example how to remove both <ins ... ></ins> and <script> ... </script> tags:

✗ ls *.html | xargs sed -i.bak -E '/<ins\b[^>]*>.*?<\/ins>/d; /<script\b[^>]*>.*?<\/script>/d'
✗ rg -in adsbygoogle * | more
✗ find . -type f -iname \*.html.bak -delete
✗
@vitali2y
vitali2y / cli-online-radio.md
Last active January 1, 2025 22:06
CLI Online Radio
mpv https://online.nasheradio.ua/NasheRadio  # Наше Радио
mpv https://online.hitfm.ua/HitFM  # Хіт FM
mpv https://radio.ukr.radio/ur1-mp3  # UA: Українське радіо
mpv https://online.kissfm.ua/KissFM  # Kiss FM
mpv https://icecastdc.luxnet.ua/lux  # Lux FM
mpv http://91.218.212.84:8000/radionv.mp3  # Radio NV
mpv https://cast.mediaonline.net.ua/radiopyatnica320  # Радио Пятница
mpv https://online.melodiafm.ua/MelodiaFM  # Мелодия FM
mpv https://online.radiorelax.ua/RadioRelax  # Радио Relax
@vitali2y
vitali2y / ChatGPT Canvas HTML Renderer from Clipboard.url
Created October 7, 2024 14:55 — forked from rmtbb/ChatGPT Canvas HTML Renderer from Clipboard.url
Chrome Bookmarklet the lets you render a full HTML page with any included css and javascript that is currently copied to your clipboard. Also works for SVG code. Useful with ChatGPT Canvas
javascript:(function(){try{navigator.clipboard.readText().then(function(clipboardText){if(clipboardText){var newWindow=window.open("","_blank","width=800,height=600");newWindow.document.open();newWindow.document.write(clipboardText);newWindow.document.close();}else{alert('Clipboard is empty. Please copy some text to the clipboard first.');}}).catch(function(err){console.error('Failed to read clipboard contents: ',err);alert('An error occurred while trying to access the clipboard. Please ensure your browser allows clipboard access.');});}catch(e){console.error('An error occurred:',e);alert('An error occurred while trying to open the new window with the clipboard content.');}})();
@vitali2y
vitali2y / linux-mint-fractional-scaling.md
Created September 30, 2024 11:46
Enable Fractional Scaling @ Linux Mint
  1. Menu -> Display app -> Settings tab -> Enable Fractional Scaling Controls -> Layout tab -> User Interface Scale %%
  2. Menu -> Accessibility app -> Visual tab -> Large Text (be aware, it resets option below)
  3. Menu -> Font Selection app -> Font Settings -> Text Scaling Factor -> 1,2

Ref: Enable Fractional Scaling in Linux Mint

@vitali2y
vitali2y / tmux-simple.md
Created May 10, 2024 18:22
Tmux simple
➜  shrinker git:(main) ✗ tmux new-session -s shrinker
[detached (from session shrinker)]   <- C-b d
➜  shrinker git:(main) ✗ tmux list-sessions
shrinker: 1 windows (created Mon Jul 31 00:03:22 2023)
➜  shrinker git:(main) ✗ tmux attach -t shrinker
[detached (from session shrinker)]
➜  shrinker git:(main) ✗
@vitali2y
vitali2y / linux-ssh-reverse-shell-tunneling.md
Created April 21, 2024 11:24
Linux SSH reverse shell tunneling

Q: Have a Linux on device in appartment A, which can go outside of local router to Internet. Have a Linux on device in appartment B located in another place on the globe. How it's possible to reach Linux A from Linux B via ssh when access to router A is prohibited?

Links

General

@vitali2y
vitali2y / jomaa-zx-k26-combo-logs.md
Created April 8, 2024 19:35
Jomaa ZX-K26 combo's logs

Jomaa ZX-K26 backlight wireless keyboard and mouse combo's logs during connecting to Linux Mint 21.2:

==> /var/log/kern.log <==
Apr  8 22:24:13 greenway kernel: [ 6719.709951] usb 3-2: new full-speed USB device number 4 using xhci_hcd
Apr  8 22:24:13 greenway kernel: [ 6719.865444] usb 3-2: New USB device found, idVendor=3554, idProduct=fc03, bcdDevice= 7.90
Apr  8 22:24:13 greenway kernel: [ 6719.865457] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Apr  8 22:24:13 greenway kernel: [ 6719.865462] usb 3-2: Product: 2.4G Receiver
Apr  8 22:24:13 greenway kernel: [ 6719.865466] usb 3-2: Manufacturer: CX
Apr  8 22:24:13 greenway kernel: [ 6719.869885] input: CX 2.4G Receiver as /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/0003:3554:FC03.0003/input/input25
Apr  8 22:24:13 greenway kernel: [ 6719.930896] hid-generic 0003:3554:FC03.0003: input,hidraw0: USB HID v1.10 Keyboard [CX 2.4G Receiver] on usb-0000:00:14.0-2/input0