Skip to content

Instantly share code, notes, and snippets.

View gerwld's full-sized avatar
🪬

Patryk Jaworski gerwld

🪬
View GitHub Profile
@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 February 22, 2025 20:03
Speedrun Auth Github on a Mac CLI
git config --global user.email "@gmail.com"
git config --global user.name "anyname"
gh auth login # Then > https > website
ssh-keygen -t rsa -b 4096 -C "[email protected]"
ssh-add ~/.ssh/id_rsa
pbcopy < ~/.ssh/id_rsa.pub
settings > ssh and > add new ssh > paste, save, done
@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": {
@gerwld
gerwld / .zshrc
Last active February 22, 2025 20:10
.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)
/**
* This script automates the process of unblocking your own blocked Instagram users list.
* It unblocks users one-by-one to avoid hitting rate limits or breaking the page.
*
* WARNING: This function directly manipulates the DOM and depends on the current HTML
* structure of Instagram's website to work. If Instagram implements changes to the
* activity page layout, structure, or functionality, this script may break or cause
* unexpected behavior. Use at your own risk and always review code before running it.
**/