Skip to content

Instantly share code, notes, and snippets.

View dungsaga's full-sized avatar
👻
ghost in the machine

DungSaga dungsaga

👻
ghost in the machine
View GitHub Profile
@dungsaga
dungsaga / Fuck-Reddit.md
Created July 1, 2023 09:49
Make Reddit clients Alive again !!

Make Reddit clients Alive again !!

Reddit has imposed paid API limits and that compelled developers to shutodwn their clients.
But There is a way you can Keep using your favourite reddit Client.

Obtaining Client ID

Step 1: Navigate to this page.

image

@dungsaga
dungsaga / reduce-size-of-a-WSL-virtual-disk.md
Last active April 17, 2025 04:35
reduce size of a WSL virtual disk

Reduce size with diskpart

You should run PowerShell as Administrator (otherwise diskpart won't be able to received the piped commands)

$vhdx_path = '%USERPROFILE%\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\ext4.vhdx'

@"
select vdisk file=$vhdx_path
compact vdisk
@dungsaga
dungsaga / bash_strict_mode.md
Created March 18, 2025 02:26 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
@dungsaga
dungsaga / sync-time.sh
Last active February 25, 2025 04:10
sync local clock in without NTP in Linux, MacOS, Windows
# I want to sync the local clock but don't have access to any NTP server.
# Website https://time.is tells me the time difference of my system clock and I can manually adjust the local clock.
# But then I recall that a HTTP response often contains a date header with current time in GMT timezone.
# I'll use it to set the system clock with the precision of 1 or 2 seconds.
# When I need more accurate time, I can use `datetime` (or `utc_datetime`) from `http://worldtimeapi.org/api/ip.txt`
# time from worldtimeapi.org has millisecond precision, you can use it to compare with your system time:
date -uIns && time curl -s http://worldtimeapi.org/api/ip.txt | sed -n 's/^utc_datetime://p'
date -Ins && time curl -s http://worldtimeapi.org/api/ip.txt | sed -n 's/^datetime://p'
@dungsaga
dungsaga / fix-osnews.md
Last active February 9, 2025 10:37
fix invisible titles in osnews.com
@dungsaga
dungsaga / spleeter.md
Last active February 9, 2025 02:38
Voice removal AKA karaoke creator
@dungsaga
dungsaga / salvage-pdf.py
Last active December 11, 2024 05:30
Salvage text from a broken pdf file
#!/usr/bin/env python3
import re, zlib, sys
def main(argv):
print("Salvage text from a broken pdf file")
print("Usage: salvage-pdf.py [<input_file.pdf> [<output_file.txt>]]")
pdf = argv[1] if len(argv) > 1 else sys.stdin.fileno()
input = open(pdf, "rb").read()
output = salvage_pdf(input)
txt = argv[2] if len(argv) > 2 else sys.stdout.fileno()
@dungsaga
dungsaga / funny_acronym_php.md
Last active October 27, 2024 15:15
funny acronym: what does PHP stand for?

Prrr Home Page

  • Pretty Home Page (some people think this is the initial meaning of PHP)
  • Professional Homepage Power
  • Private Home Page
  • Personal Home Page (the original name in the announcement "Announce: Personal Home Page Tools (PHP Tools)")
  • Phucking Home Page

Programmable

@dungsaga
dungsaga / rfc3161.txt
Created July 26, 2024 07:52 — forked from Manouchehri/rfc3161.txt
List of free rfc3161 servers.
https://rfc3161.ai.moda
https://rfc3161.ai.moda/adobe
https://rfc3161.ai.moda/microsoft
https://rfc3161.ai.moda/apple
https://rfc3161.ai.moda/any
http://rfc3161.ai.moda
http://timestamp.digicert.com
http://timestamp.globalsign.com/tsa/r6advanced1
http://rfc3161timestamp.globalsign.com/advanced
http://timestamp.sectigo.com