New pages
Jump to navigation
Jump to search
- 10:26, 10 July 2025 Url encode (hist | edit) [577 bytes] Chubbard (talk | contribs) (Created page with "==URL encoding function== * Simple way to encode URLs for bash scripts.. Brainless but seems to work ok for most use cases.. <pre> urlencode() { local string="$1" local encoded="" local pos c o for (( pos=0 ; pos<${#string} ; pos++ )); do c=${string:$pos:1} case "$c" in [a-zA-Z0-9.~_-]) o="$c" ;; *) printf -v o '%%%02X' "'$c" esac encoded+="$o" done echo "$encoded" } </pre> Category:Bash")
- 10:37, 15 April 2025 Ssh (hist | edit) [515 bytes] Chubbard (talk | contribs) (Created page with "== SSH examples for abnormal tasks == Yes, I can never remember exactly how to get the !#$!@# port forwarding done correctly. Bah! ===SSH port forwarding for postgres=== * Accounting for possibility of using abnormal ssh ports and strange ssh keys. * Connect pgadmin to localhost:5432 and set your authentication <pre> export KEY=~/.ssh/some_key export PORT=2345 export JUMPBOX=192.168.15.58 ssh -i ${KEY} -p ${PORT} -L 5432:192.168.15.250:5432 SSH_USER@$${JUMPBOX} -N </p...")
- 09:34, 10 April 2025 Bash-ps-examples (hist | edit) [304 bytes] Chubbard (talk | contribs) (Created page with "== Generic Page of PS options == === threads from process === See the threads for a given process * [https://serverfault.com/questions/932406/how-to-tell-threads-from-processes-in-top-and-ps-on-linux show threads from process] <pre> ps aux |grep processName ps -fly -T -p PID </pre>")