Skip to content

Instantly share code, notes, and snippets.

View Hans5958's full-sized avatar
Uni and uni and uni and... (limited availability!)

Hans5958 Hans5958

Uni and uni and uni and... (limited availability!)
View GitHub Profile
Hans5958 / Google Drive PDF
Last active April 26, 2024 05:30 — forked from dpaluy/
Google Drive PDF Ripper: Rips (protected/view-only) PDFs from Google Drive

Google Drive PDF Ripper

This script rips (protected/view-only) PDFs from Google Drive by copying all the page images provided by Google Drive, and then put it on a PDF. It is a ripper (not a downloader) because it does not download the PDF file directly, and it involves some sort of conversion (PDF > images > PDF).

This script is based on and, with updates made since I was quite bored, and didn't want to adjust parts of the code to my own when I'm using it.


  • Uses latest jsPDF version and modern JavaScript techniques
  • Supports Trusted Types API (for Google Chrome/Chromium users)
Hans5958 / chalk-template to
Created February 22, 2024 13:11
Converting from chalk-template to chalk with replace-all feature.
  1. Convert from template literal format.

    Find: chalk`(.*)\{([a-z]+) (.+)\}
    Replace: $1${chalk.$2(`$3`)}
    sed syntax: s/chalk`(.*)\{([a-z]+) (.+)\}/$1${chalk.$2(`$3`)}/g

  2. Convert`${bar}`) to

    Find: \(`\$\{([^`{}]+)\}`\)
    Replace: ($1)

Assalamualaikum warahmatullahi wabarakatuh.

Ada yang mengatakan bahwa komunis di negara lain sudah tidak eksis lagi, jadi dia juga mungkin beranggapan di Indonesia tidak eksis lagi. Matamu picek. Justru kewaspadaan perlu diterapkan sedini mungkin. Matamu picek! Matamu picek. Jangan selalu bilang ke negara lain tidak eksis lagi.

Justru harus kamu jaga di negara ini jangan sampai penghianatan itu kembali lagi di Indonesia. Ingat, darah keturunan PKI akan tetap mengalir kepada anak cucunya dia akan tetap menjadi penghianat. Bohong kalau tidak kamu. Picek yang mengatakan bahwa [di] negara lain tidak eksis lagi. Picek! Picek! Matamu picek!

Wassalamualaikum warohmatullohi wabarokatuh.

Hans5958 /
Last active September 7, 2023 13:43
Notes regarding Black MIDI Comparison Block (September 2023)

Video Source: Piano From Above v1.1.0 (with WinMMWRP), Open Broadcaster Software (OBS) v29.1.3
Audio Source: OmniMIDI v14.8.4 (1024 voices)
Soundfont: Choomaypiano.sf2

Specifications (Acer Nitro 5 AN515-57):

CPU: Intel Core i7-11800H @ 2.3 GHz (no overclock)
RAM: 16 GB DDR4 SDRAM @ 3200 MHz (15.8 GB total, dynamic virtual memory)
Storage: 512 GB NVMe SSD
GPU: NVIDIA GeForce RTX 3060 Laptop GPU

Hans5958 /
Last active August 1, 2023 10:27
A simple Reddit crossposter script with Python, using gallery-dl to fetch the posts. Example result:
import os
import json
import praw
import subprocess
# Run gallery-dl, get first 10 since a gallery can have at least 10
#["gallery-dl", "--range", "1-10", "--write-metadata", "-D", "fetch", ""])
print("Done fetching")
Hans5958 / Active Canvas
Created July 24, 2023 11:16
Contents of Place Atlas Discord server event

Active Canvas Period

r/place of 2023 is underway! We will be active managing the Atlas, primarily updating the canvas, while accepting submission from time to time, depending on availability.

This just an abstract period that we made. This does not mean we don't accept submissions after this Discord event is over.

Speculated end date of r/place based on the event made on the Google Play page of the app. (+ 30 minutes for canvas addition)


Hans5958 /
Last active June 24, 2023 04:36
Some commands that I save for managing my Docker setup.
docker volume create gitlab-runner-config
docker run -d --name gitlab-runner --restart always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v gitlab-runner-config:/etc/gitlab-runner \
docker exec -it gitlab-runner gitlab-runner register
docker ps -f status=exited | grep "\-cache-" | awk '{print $1}' | xargs docker rm
docker kill $(docker ps -q) --signal=SIGINT

Season 1-3 (untested)

0:00.000 - 0:58.500 Intermission
23:32.000 - 59:59.999 Endcards/Credits

Season 4

ffmpeg -i "Outrunning Blue Shells for an Entire Race 😳 [HD].webm" -ss 4:28.0628033333333 -i "..\Audios\Lynyrd Skynyrd - Free Bird.m4a" -map 0:v:0 -map 1:a:0 -c:v copy -shortest "Outrunning Blue Shells for an Entire Race 😳 [HD]"