Skip to content

Instantly share code, notes, and snippets.

View ptjaworski's full-sized avatar

Patryk Jaworski ptjaworski

View GitHub Profile
@(set ^ "0=%~f0" -des ') &set 1=%*& powershell -nop -c iex(out-string -i (gc -lit $env:0)) & exit /b ')
# AveYo: fix annoyance after uninstalling Xbox, AveYo 2024.12.28
$id = 'ms-gamebar-annoyance'
#:: Status checkmark
$s6 = [char]0x2713; if (gp Registry::HKCR\ms-gamebar NoOpenWith -ea 0) {$s7 = ''} else {$s7 = $s6; $s6 = ''}
#:: Args / Dialog - skip the prompt by commandline parameters or rename script: ms-gamebar-annoyance apply.bat
$cl = ''; $arg = @{6 = 'apply'; 7 = 'restore'; 2 = 'cancel'} ; $f0 = ($env:0,"$pwd\.pasted")[!$env:0]
@ptjaworski
ptjaworski / .gitignore
Created January 16, 2026 11:51 — forked from rickymunizjr/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@ptjaworski
ptjaworski / 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]} {
@ptjaworski
ptjaworski / init.lua
Last active November 16, 2025 18:02
MacOS HammerSpoon 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"]
@ptjaworski
ptjaworski / 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
@ptjaworski
ptjaworski / 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)": {
@ptjaworski
ptjaworski / 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 "your_email@gmail.com" &&
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 "your_email@gmail.com" &&
ssh-add ~/.ssh/id_rsa &&
gh auth login
1.1) Click Enter 6 times
@ptjaworski
ptjaworski / 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