Skip to content

Instantly share code, notes, and snippets.

View gerwld's full-sized avatar

Patryk Jaworski gerwld

View GitHub Profile
# 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 September 3, 2025 17:32
Speedrun Auth Github on a Mac CLI
git config --global user.email "[email protected]"
git config --global user.name "name"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" && brew install gh
# optional - install omz
# sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
gh auth login # Then > https > website
ssh-keygen -t rsa -b 4096 -C "[email protected]"
@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() {
@gerwld
gerwld / reactInject.js
Created February 1, 2025 11:56
Inject script for DOM that often rerenders on start
(() => {
function injectButton(parent) {
if (parent.querySelector(".pf_lb2")) return; // Prevent duplicates
const wrapper = document.createElement("div");
wrapper.innerHTML = `<!-- CONTENT -->`;
parent.prepend(wrapper);
}
function waitForReactElement(attempts = 0, maxAttempts = 100) {
@gerwld
gerwld / typescript.json
Last active February 23, 2025 11:41
Snippets for TS
{
// CMD Shift P > Snippets: Configure Snippets
"Add Module exports": {
"prefix": "me",
"body": ["module.exports = "],
"description": "Module exports"
},
"1": {