Skip to content

Instantly share code, notes, and snippets.

View hlorand's full-sized avatar
👾

Loránd Horváth hlorand

👾
View GitHub Profile
@hlorand
hlorand / clone-all-gists.sh
Created March 1, 2023 22:42
Clone every GitHub Gists into separate folders
#!/bin/bash
##################################
# Clone every GitHub Gist
# Requirement: The GitHub CLI
# sudo apt install gh
##################################
mkdir gists
cd gists
@hlorand
hlorand / 2-3-hosszu-domain-szabad-e.sh
Last active August 19, 2025 11:51
Domain ellenőr: Ellenőrzi az összes 2 és 3 hosszú magyar .hu domain-t, hogy szabad-e
#!/bin/bash
# change working dir
cd "$(dirname "$0")"
# get ajax_nonce from webpage
wget --output-document domain.html "https://domain.hu"
AJAX_NONCE=$(cat domain.html | grep nonce | cut -d"=" -f2 | tr -d " ;" | jq --raw-output ".ajax_nonce")
echo "ajax_nonce = $AJAX_NONCE"
# prepare website
@hlorand
hlorand / ncore.py
Created December 5, 2022 09:30
nCore letöltő - bejelentkezik az nCore-ba és automatikusan letölti a keresés első találatát
# bejelentkezik az nCore-ba és automatikusan letölti a keresés első találatának torrent file-ját
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.chrome.service import Service
from selenium.webdriver import Chrome
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
search = "harry potter felver"
@hlorand
hlorand / vr180-to-flatSBS.sh
Created August 20, 2022 00:49
Converts VR180 to flat SBS side-by-side video
#!/bin/bash
# Read more:
# http://ffmpeg.org/ffmpeg-filters.html#v360
ffmpeg.exe -i input.mp4 -vf "v360=input=equirect:output=flat:ih_fov=180:h_fov=70:v_fov=70:pitch=-10:in_stereo=sbs:out_stereo=sbs,scale=1600:-1" output.mp4
@hlorand
hlorand / alpinejs-test.html
Created August 2, 2022 00:20
Alpine.js feature test
<script src="https://unpkg.com/alpinejs" defer></script>
<style>
body{
background-color: #444;
color: #ddd;
}
</style>
// ==UserScript==
// @name Restore Delete button for YouTube playlists
// @namespace restore-delete-button-for-yt-playlists
// @version 0.1
// @description When you watch a playlist, the delete button is hidden under a submenu. It restores the delete button to its original place near the playlist item. When you hover over a playlist item, the trashcan icon appears. See in action: https://i.imgur.com/MwM3GCb.gif
// @author Lorand Horvath
// @match https://www.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// ==/UserScript==
@hlorand
hlorand / chrome-fix-macos.sh
Created May 25, 2022 11:14
Fix: Chrome not starting or crashing on patched MacOS Catalina
#!/bin/sh
sudo xattr -lr /Applications/Google\ Chrome.app
sudo xattr -cr /Applications/Google\ Chrome.app
sudo codesign -f -s - /Applications/Google\ Chrome.app
@hlorand
hlorand / archive-org-uploader.sh
Last active May 18, 2022 22:47
Uploads files to your archive.org account
#!/bin/bash
#######################
# Usage:
# ./upload.sh <foldername> <filename>
#
# Foldername must be globally unique.
# Fill in the USER and PASS variable below.
#
# Known issues: filename with spaces or filename with full or relative path
@hlorand
hlorand / 3d-cube.py
Last active March 1, 2023 21:54
3D rotating cube in Python - only 15 lines of code https://imgur.com/87vnopo.gif
# 3D rotating cube in Python - only 15 lines of code https://imgur.com/87vnopo.gif
import tkinter, math, time
c = tkinter.Canvas(tkinter.Tk(), width=600, height=600)
c.pack()
while t := int(time.time()*60) :
c.update()
c.delete("all"); n = []
@hlorand
hlorand / video-brightness-bookmarklet.js
Created January 31, 2022 10:32
Decrease video brightness bookmarklet
javascript:(function(){document.querySelector("video").style.filter = "brightness(0.5)";})()