This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Auto-Refresh with Overlay (Pause + Hover Info) | |
| // @match *://x.com/* | |
| // @version 0.5 | |
| // @description Checks inactivity and reloads the page after a set time interval, showing a countdown overlay with pause/resume toggle and hover hint. | |
| // ==/UserScript== | |
| // Vibecoded... I don't claim to know much about frontend or js, it works and I'm happy 👍 | |
| // Adds a timer that can be tweaked to refresh x.com (can be changed to whatever you like with `@match`. | |
| // The remaining time before refresh is shown as an overlay with transparency on the top left corner. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # DESCRIPTION: Install/setup minimum customization for bash. | |
| # export the desired value before installing | |
| VIM_BASH_ONLY=${VIM_BASH_ONLY:-0} | |
| INSTALL_STARSHIP=${INSTALL_STARSHIP:-1} | |
| install_workstuff() { | |
| # Apt stuff | |
| DEBIAN_FRONTEND=noninteractive |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " basic stuff | |
| execute pathogen#infect() | |
| " status bar colors | |
| au InsertEnter * hi statusline guifg=black guibg=#d7afff ctermfg=black ctermbg=magenta | |
| au InsertLeave * hi statusline guifg=black guibg=#8fbfdc ctermfg=black ctermbg=cyan | |
| hi statusline guifg=black guibg=#8fbfdc ctermfg=black ctermbg=cyan | |
| " Status line | |
| " default: set statusline=%f\ %h%w%m%r\ %=%(%l,%c%V\ %=\ %P%) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ( | |
| set -x; cd "$(mktemp -d)" && | |
| OS="$(uname | tr '[:upper:]' '[:lower:]')" && | |
| ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" && | |
| KREW="krew-${OS}_${ARCH}" && | |
| curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" && | |
| tar zxvf "${KREW}.tar.gz" && | |
| ./"${KREW}" install krew | |
| echo 'export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"'>> ${HOME}/.bashrc | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Set this up as startup script | |
| sleep 60 | |
| while true; do | |
| if ps | grep -v grep | grep -q openvpn; then | |
| if ! ping -qc3 www.xxx.yyy.zzz 2>&1 1>/dev/null; then | |
| killall openvpn | |
| sleep 2 | |
| openvpn --config /tmp/openvpncl/openvpn.conf --daemon | |
| logger "WARNING: Restarted openvpn due to connection problems" | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Store in /etc/bash_completion.d/ssh | |
| # Create a ~/.ssh/hosts file that includes the hostnames you want to autocomplete | |
| # Example: `Host hostname` | |
| # Found this idea here https://unix.stackexchange.com/a/181603 | |
| _ssh() | |
| { | |
| local cur prev opts | |
| COMPREPLY=() | |
| cur="${COMP_WORDS[COMP_CWORD]}" | |
| prev="${COMP_WORDS[COMP_CWORD-1]}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| TRACK='TRACKING_CODE_GOES_HERE' | |
| PAGE_RESPONSE=`curl -i -X POST -d "loc=en_US&HTMLVersion=5.0&USER_HISTORY_LIST=&trackNums=$TRACK&track.x=Track" https://wwwapps.ups.com/WebTracking/track 2>/dev/null` | |
| clear ; grep -A 30 'Last Location:' <(echo "$PAGE_RESPONSE") | tr '\n\r\t' ' ' | sed -e 's/<dd>//g' -e 's/ //g' -e 's/<\/dt>//g' -e 's/<\/lablel>//g' -e 's/<dt>//g' -e 's/<\/label>//g' -e 's/<\/dl>//g' -e 's/<\/dd>//g' -e 's/<label for="">//g' | tr -s ' 'i; echo -e "\r" | |
| grep -A 20 'Scheduled Delivery:' <(echo "$PAGE_RESPONSE") | tr '\n\r\t' ' ' | sed -e 's/ //g' -e 's/<dd>//g' -e 's/<dl>//g' -e 's/<label>//g' -e 's/<\/dt>//g' -e 's/<\/lablel>//g' -e 's/<dt>//g' -e 's/<\/label>//g' -e 's/<\/dl>//g' -e 's/<\/dd>//g' -e 's/<label for="">//g' | tr -s ' ' | |
| echo;exit 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This script must be run as the desired user | |
| # The container name will be $USER for simplicity | |
| # For this to work you need to sudo su <user>, else lxc wont work | |
| # Add subuids/gids | |
| sudo usermod --add-subuids 100000-165536 $USER | |
| sudo usermod --add-subgids 100000-165536 $USER | |
| # LXC Config for user | |
| mkdir -p ~/.config/lxc |