Skip to content

Instantly share code, notes, and snippets.

@slav0nic
slav0nic / backports.pref
Last active May 26, 2022 08:36
debian bullseye sources.list
Package: *
Pin: release n=bullseye-backports
Pin-Priority: 900
@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active November 3, 2024 22:54
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 \" \
@tzmartin
tzmartin / m3u8-to-mp4.md
Last active November 17, 2024 04:41
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
@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";
@nasirhafeez
nasirhafeez / openvpn-server-for-mikrotik-on-docker.md
Last active September 26, 2024 17:12
OpenVPN Server for Mikrotik on Docker
@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)),