Skip to content

Instantly share code, notes, and snippets.

View gerwld's full-sized avatar

Patryk Jaworski gerwld

View GitHub Profile
@gerwld
gerwld / gitk.sh
Created November 10, 2025 13:44
git-gui fixed system permissions
#!/bin/sh
# Tcl ignores the next line -*- tcl -*- \
exec /usr/local/opt/tcl-tk/bin/wish "$0" -- "$@"
# Copyright © 2005-2016 Paul Mackerras. All rights reserved.
# This program is free software; it may be used, copied, modified
# and distributed under the terms of the GNU General Public Licence,
# either version 2, or (at your option) any later version.
if {[catch {package require Tcl 8.6-} err]} {
@gerwld
gerwld / init.lua
Last active October 23, 2025 11:55
MacOS Honeyspoon config for brightness / volume / etc keys on win keyboard
-- arr to track timers for repeating keys
local repeatTimers = {}
-- function to start repeating an action
local function startRepeating(key, action)
-- run action immediately on press
action()
-- if already running, skip
if repeatTimers[key] then return end
-- Start repeating every 0.1 seconds
# Sample workflow for building and deploying a Next.js site to GitHub Pages
#
# To get started with Next.js see: https://nextjs.org/docs/getting-started
#
name: Deploy Next.js site to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
@gerwld
gerwld / clone.sh
Created March 15, 2025 18:55
repos copy (for backup)
gh repo list gerwld --limit 4000 | while read -r repo _; do
gh repo clone "$repo" "$repo"
done
@gerwld
gerwld / css.json
Created February 27, 2025 19:59
Extra CSS snippets
{
"media screen only (max)": {
"prefix": "mas",
"body": [
"@media only screen and (max-width: $1px) {",
"$2",
"}"
]
},
"media screen only (min)": {
@gerwld
gerwld / fast-auth-github-mac.txt
Last active October 23, 2025 12:49
Speedrun Auth Github on a Mac CLI
1) - Copypaste all as one line:
git config --global user.email "[email protected]" &&
git config --global user.name "your_username" &&
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" && brew install --force-bottle gh &&
ssh-keygen -t rsa -b 4096 -C "[email protected]" &&
ssh-add ~/.ssh/id_rsa &&
gh auth login
1.1) Click Enter 6 times
@gerwld
gerwld / Docker Desktop v 4.0.0 thru 4.22.1 direct download links
Created February 18, 2025 22:29 — forked from kupietools/Docker Desktop v 4.0.0 thru 4.22.1 direct download links
List of Direct Download links for Docker Desktop from version 4.0.0 released 2021-08-31 thru 4.22.1 released 2023-08-24, as archived on archive.org
// fastest speed, no-limits, high bitrate
yt-dlp -f "bestvideo[height<=1080]+bestaudio/best" --no-wait --max-downloads 1 --concurrent-fragments 8 --retries 10 --fragment-retries 10 https://www.youtube.com/watch?v=MDZC8VDZnV8
@gerwld
gerwld / generate.js
Last active February 12, 2025 15:43
Generate a secret key
require('crypto').randomBytes(48, function(err, buffer) { var token = buffer.toString('hex'); console.log(token); });
// or
node -e "console.log(require('crypto').randomBytes(64).toString('hex'))"
// or
openssl rand -base64 32
/**
* This part injects element before DOMContentLoaded event,
* and reaplies it each time React / Other framework rerenders the parent component.
*
* @returns void
*/
;(() => {
let observer;
function injectButton() {