Skip to content

Instantly share code, notes, and snippets.

View ptjaworski's full-sized avatar

Patryk Jaworski ptjaworski

View GitHub Profile
@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 / 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
@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 / .zshrc
Last active November 7, 2025 15:08
.zshrc config
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="robbyrussell"
export PATH="/usr/local/opt/ruby/bin:$PATH"
#17 java
# export JAVA_HOME=$(/usr/libexec/java_home -v 17)
/**
* More robust Instagram "unlike all" script for the Likes activity page.
* Paste on: https://www.instagram.com/your_activity/interactions/likes
*
* Note: Still brittle (depends on Instagram's DOM). Use at your own risk.
*/
; (async function () {
const DELETION_BATCH_SIZE = 9
const DELAY_BETWEEN_ACTIONS_MS = 1200
const DELAY_BETWEEN_WENTWRONG_MS = 3000000
@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 / 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
# 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 / typescriptreact.json
Last active March 14, 2025 17:55
Snippets for Typescript React
// To open and edit javascriptreact.json in VS Code:
// Press Ctrl+Shift+P (or Cmd+Shift+P on Mac) to open the Command Palette.
// Type Preferences: Configure User Snippets and select it.
// Choose javascriptreact.json from the list.
{
"Add Styles Import": {
"prefix": "ims",
"body": ["import style from './style.module.css';"],
@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)": {