Skip to content

Instantly share code, notes, and snippets.

@odan
odan / mysq_uuid_v4.md
Last active May 10, 2024 15:31
Generating UUID v4 in MySQL

Generating UUID v4 in MySQL

SELECT
  LOWER(
    CONCAT(
      # 1th and 2nd block are made of 6 random bytes
      HEX(RANDOM_BYTES(4)),
      '-',
 HEX(RANDOM_BYTES(2)),
@sheeeng
sheeeng / keycool.md
Last active June 30, 2025 12:18
KEYCOOL keyboard.

KEYCOOL Keyboard

  • Compact 84 keys layout.
  • Cherry MX switches.
  • No backlight by default, but able to support DIY backlight.
  • Polybutylene terephthalate (PBT) key caps.
  • Detachable 1.5 meter USB-C cable.
  • NKRO refers to N-key rollover. A keyboard with N-key rollover can register as many keys as you can press at once without "dropping" any characters. This means that no matter how fast you type, your keyboard will keep up.
  • 750 grams.
@adamsrog
adamsrog / mg-webhook.php
Last active September 27, 2024 17:07
Mailgun webhook for delivering messages to Telegram Channel
<?php
// check for POST method
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// get payload data
$post = json_decode(file_get_contents('php://input'), true);
$signature = $post['signature'];
$data = $post['event-data'];
$key = "MAILGUNAPIKEY";
@tzmartin
tzmartin / m3u8-to-mp4.md
Last active June 16, 2025 20:21
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active June 30, 2025 17:24
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@slav0nic
slav0nic / backports.pref
Last active May 26, 2022 08:36
debian bullseye sources.list
Package: *
Pin: release n=bullseye-backports
Pin-Priority: 900