santiago / /etc/nginx/update-home-ip.sh
0 Kedvelések
0 forkok
1 fájlok
Utoljára aktív
1 | #!/usr/bin/env bash |
2 | |
3 | # ------------------------------------------------------------------------------ |
4 | # This will either allow automically with allowed IP or ask for auth otherwise |
5 | # in /etc/nginx/sites-available/search.lema.org |
6 | # ------------------------------------------------------------------------------ |
7 | # satisfy any; |
8 | # include /etc/nginx/home_allow.conf; |
9 | # auth_basic "Restricted"; |
10 | # auth_basic_user_file /etc/nginx/.htpasswd; |
santiago / start_chromium.sh - Pi no disk writing
0 Kedvelések
0 forkok
1 fájlok
Utoljára aktív
# RUN chromium in full screen with minimal SD-Card writes, runs OK on a Raspberry 3 with a webpage playing video
1 | #!/bin/sh |
2 | |
3 | # RUN chromium in full screen with minimal SD-Card writes, runs OK on a Raspberry 3 with a webpage playing video |
4 | |
5 | # ADD a ram disk in fstab with this line |
6 | # tmpfs /tmpcache tmpfs nodiratime,noatime,nosuid,nodev,size=256M 0 0 |
7 | |
8 | # and that this script is called on startup for a minimalistic (no desktop setup) |
9 | # /etc/xdg/openbox/autostart |
santiago / entregas_lock.yaml - delivery box
0 Kedvelések
0 forkok
1 fájlok
Utoljára aktív
ESPhome code for my delivery box
1 | globals: |
2 | - id: ready_to_open |
3 | type: bool |
4 | initial_value: 'false' |
5 | |
6 | esphome: |
7 | name: entregas-lock |
8 | friendly_name: entregas-lock |
9 | on_boot: |
10 | then: |
santiago / vv.sh - vim or sudo vim
0 Kedvelések
0 forkok
1 fájlok
Utoljára aktív
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 / .xbindkeysrc mac-like bindings
0 Kedvelések
0 forkok
1 fájlok
Utoljára aktív
xbindkeys commands to make Command + C / V / X do Control + Shift + C / V / X
1 | "xdotool keydown Control_L keydown Shift_L sleep 0.1 key c keyup Shift_L keyup Control_L" |
2 | release+m:0x40 + c |
3 | |
4 | "xdotool keydown Control_L keydown Shift_L sleep 0.1 key x keyup Shift_L keyup Control_L" |
5 | release+m:0x40 + x |
6 | |
7 | "xdotool keydown Control_L keydown Shift_L sleep 0.1 key v keyup Shift_L keyup Control_L" |
8 | release+m:0x40 + v |
santiago / kiwix_start.sh
0 Kedvelések
0 forkok
1 fájlok
Utoljára aktív
Start kiwix with all zim files
1 | #!/bin/bash |
2 | ZIMDIR=/hugedisk/kiwix/zims |
3 | LIBRARY_XML=/hugedisk/kiwix/library.xml |
4 | |
5 | pkill kiwix-serve |
6 | |
7 | touch $LIBRARY_XML |
8 | echo "Will scan zimdir: $ZIMDIR" |
9 | for f in "$ZIMDIR"/*.zim; do |
10 | if [[ -f "$f" ]]; then |
santiago / amishell.sh window decoration
0 Kedvelések
0 forkok
1 fájlok
Utoljára aktív
1 | #!/bin/bash |
2 | |
3 | cd /home/pi/scripts/ |
4 | /bin/lxterminal -e 'tmux' & |
5 | sleep 8 |
6 | source ./windowfix.sh |
7 | |
8 | window_name="tmux" |
9 | |
10 | #resizing like this fails on cool retro term but we use geometry above |
santiago / windowfix.sh
0 Kedvelések
0 forkok
1 fájlok
Utoljára aktív
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 Kedvelések
0 forkok
1 fájlok
Utoljára aktív
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 |
Újabb
Régebbi