santiago / vv.sh - vim or sudo vim

0 вподобань
0 форк(-ів)
1 файл(-ів)
Остання активність 1747056282
Bash command to edit file with nvim with my user or sudo if necessary to write the file. Use config for my user with root (will download modules again)
1 #!/bin/bash
2
3 vv() {
4 if [ $# -eq 0 ]; then
5 echo "Usage: vv <file>"
6 echo "Will edit with current user or sudo if needed but using nvim config of this user"
7 return 1
8 fi
9
10 vpath=$(which $EDITOR)

santiago / windowfix.sh

0 вподобань
0 форк(-ів)
1 файл(-ів)
Остання активність 1747055827
Resize and remove window decoration on PopOS and Linux desktops (from stack overflow)
1 #!/usr/bin/env zsh
2
3
4 wait_find_window_id() {
5 while true; do
6 window_id=$(wmctrl -l | grep "$1" | awk '{print $1}')
7 if [ -n "$window_id" ]; then
8 echo "$window_id"
9 return
10 fi

santiago / mqtt_shutdown_listen.sh

0 вподобань
0 форк(-ів)
1 файл(-ів)
Остання активність 1747055737
Simple script listens to a MQTT value change and shutdown the machine
1 #!/usr/bin/env zsh
2
3
4 if [ -z "$RASPISTUFF_DIR" ];then
5 export RASPISTUFF_DIR="$(cd "$(dirname "$(readlink -f "${(%):-%x}")")" && pwd)"
6 fi
7
8
9 cd $RASPISTUFF_DIR

santiago / upgrade_snac_to_head.sh

0 вподобань
0 форк(-ів)
1 файл(-ів)
Остання активність 1747055153
upgrade snac from source to current head state (to test beta)
1 "upgrade_snac_to_head.sh" 36L, 604B 16,30 All
2 #!/usr/bin/env bash
3
4 #Pre existing cloned repo
5 cd $HOME/snac2
6
7 SNAC_USER=snac
8 SNAC_DATA=/home/snac/data
9
10 separator() {

santiago / upgrade_snac.sh

0 вподобань
0 форк(-ів)
1 файл(-ів)
Остання активність 1747055088
upgrade snac from source to latest tag (=release version)
1 ~
2 ~
3 "upgrade_snac.sh" 39L, 724B 18,1 All
4 #!/usr/bin/env bash
5
6 #Pre existing cloned repo
7 cd $HOME/snac2
8
9 SNAC_USER=snac
10 SNAC_DATA=/home/snac/data

santiago / snacSearch.sh

0 вподобань
0 форк(-ів)
1 файл(-ів)
Остання активність 1747054182
script to search for a string in a post and pass it to snacPost script for a clean output
1 "snacSearch.sh" 22L, 418B 18,3 All
2 #!/usr/bin/env bash
3
4 if [ -z "$1" ]; then
5 echo "Usage: $0 <NEEDLE>"
6 exit 1
7 fi
8
9 if [[ -z "$SNAC_USER" || -z "$SNAC_BASEDIR" ]]; then
10 echo "Error: SNAC_USER and SNAC_BASEDIR must be set." >&2
Новіше Пізніше