Skip to content

Instantly share code, notes, and snippets.

Lokawn /
Created June 9, 2024 09:58 — forked from primaryobjects/
How to download m3u8 and ts video movie streams.

m3u8 Downloading

  1. Open Chrome Developer tools and click the Network tab.
  2. Navigate to the page with the video and get it to start playing.
  3. Filter the list of files to "m3u8".
  4. Find master.m3u8 or index.m3u8 and click on it.
  5. Save the file to disk and look inside it.
  6. If the file contains a single m3u8 master url, copy that one instead.
  7. Run the program m3u8x.
  8. Paste the same m3u8 url in both textboxes (URL and Quality URL) and click "Headers" and set the referral url and user-agent from the request as found in Chrome.
Lokawn / pdf-full-merge.js
Created December 13, 2023 17:37 — forked from mid-kid/pdf-full-merge.js
Merge all attributes of multiple PDF files using MuPDF
// Merge all attributes of multiple PDF files (pdf-full-merge.js)
// Extended from MuPDF's docs/examples/pdf-merge.js
// Ever had problems with tools that don't copy certain attributes of a PDF?
// This script uses MuPDF to merge/join/concatenate as much as possible, including:
// - bookmarks / outlines / table of contents
// - link attributes of said outlines, such as viewrect and zoom
// - whether outlines appear open or closed by default
// - annotations
// - 3d objects / PDF3D
  • 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 \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
Lokawn /
Created December 25, 2022 12:41 — forked from mavieth/
Bash script color output

How to Sign and Release to The Central Repository with GitHub Actions

GitHub allows automated builds using GitHub Actions. A commonly asked question is how to release artifacts (packaged Java jars) built by Maven and Gradle to The Central Repository. The GitHub Actions documentation provides only part of the answer.

So, first, configure your Maven project for staging artifacts to The Central Repository, by reading through Configuring Your Project for Deployment and following those steps. Please make sure that the maven-gpg-plugin is configured to prevent gpg from using PIN entry programs, as follows:

# coding: utf-8
# Licensed under the MIT License
# Copyright © 2016 Bharadwaj Raju <>
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, subject to the following conditions:
Lokawn / Install i3 on
Created July 26, 2022 08:14 — forked from chreniuc/Install i3 on
Steps i followed to install arch + i3
timedatectl set-ntp true
timedatectl set-timezone Europe/Bucharest
fdisk /dev/sda
n 1G pentru /boot /dev/sda1
a - Flag it as bootable
n - 4G pentru swap /dev/sda3
n - 70G pentru / /dev/sda2
Lokawn / .gitattributes
Created July 26, 2022 08:12 — forked from mezcel/.gitattributes
Alpine Linux Notes
## win10 line endins
*.bat eol=crlf
*.ps1 eol=crlf
## Linux/Posix line endins
*.go eol=lf
*.sh eol=lf
*.source eol=lf
Makefile eol=lf
Lokawn / wallpaper-changer
Created July 26, 2022 08:07 — forked from daniel-j/wallpaper-changer
This is a simple random wallpaper changer to use with Awesome WM. You need to install feh to use this.
# Created by djazz // Dangershy
# Dependencies: feh
# to make it loop over lines instead of spaces in filenames