Skip to content

Instantly share code, notes, and snippets.

function FindProxyForURL(url, host) {
PROXY = "PROXY proxy.corp.ipsy.com:80; DIRECT";
hosts = ["*.acloud.guru", "ifconfig.me"];
for (let i = 0; i < hosts.length; i++) {
if (shExpMatch(host, hosts[i])) {
return PROXY;
}
}
return "DIRECT";
}
@magicdude4eva
magicdude4eva / zsh-syntax-highlighting paste performance improvement
Last active April 25, 2025 19:23
zsh-syntax-highlighting paste performance improvement
Add the following in .zshrc:
...
plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl)
...
### Fix slowness of pastes with zsh-syntax-highlighting.zsh
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
@jonashackt
jonashackt / bash
Last active December 1, 2021 01:45
Remote debugging Spring Boot
### java -jar
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8001,suspend=y -jar target/cxf-boot-simple-0.0.1-SNAPSHOT.jar
### Maven
Debug Spring Boot app with Maven:
mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8001"
@igrigorik
igrigorik / github.bash
Last active September 12, 2025 09:24
Open GitHub URL for current directory/repo...
alias gh="open \`git remote -v | grep git@github.com | grep fetch | head -1 | cut -f2 | cut -d' ' -f1 | sed -e's/:/\//' -e 's/git@/http:\/\//'\`"
@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active October 8, 2025 09:42
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
mkdir -p ~/.ssh
# generate new personal ed25519 ssh keys
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <rob@rob.tn>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active October 29, 2025 11:48
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname