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/sh | |
| #Megasaturnv 2018-01-08 | |
| # Uncomment to create checkRcloneVersion_current.txt file: | |
| # echo v1.38 > checkRcloneVersion_current.txt | |
| # Add following line to crontab (crontab -e) to check once a week (every Monday at 21:21) | |
| # 21 21 * * 1 ./checkRcloneVersion.sh | |
| LOCAL_VERSION="$(cat checkRcloneVersion_current.txt)" |
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/sh | |
| #Megasaturnv 2017-11-17 | |
| #useful examples: /usr/share/doc/tmux/examples | |
| SESSION="tmux_$USER" | |
| tmux -2 new-session -d -s $SESSION | |
| #0 Setup a window for general use | |
| tmux rename-window -t $SESSION:0 "General" |
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/sh | |
| #Megasaturnv 2017-11-17 | |
| (tmux ls | grep -q "attached" && echo "[Info] You are already attached to a tmux session") || tmux attach |
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/sh | |
| #Megasaturnv 2017-07-28 | |
| echo $(($(date -d 25-Dec +%-j) - $(date +%-j))) days until christmas! |
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/sh | |
| #Megasaturnv 2017-07-28 | |
| #Url of the RSS feed | |
| RSS_URL="" | |
| ##Commented version: | |
| #Download the rss feed | |
| curl --silent "$RSS_URL" | \ | |
| #Only match lines with 'title>' or 'description>' |
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
| //Megasaturnv 2017-07-05 | |
| //Arduino simple digitalRead with software debounce | |
| //Digital read an pin with software debounce. Pin should be set as: pinMode(pin, INPUT_PULLUP) in setup(). | |
| //Arduino ATMEGA328P (and some other ATMEL chips) have internal pull-up resistors. Pin is active when connected to GND | |
| //Projects where pins are active high (with pull down resistors) should modify lines 7 and 11 below, as indicated | |
| //This function will return true if input is active for at least 50ms and then released. The function will return false if input is not active | |
| bool digitalReadDebounce(int pin) { | |
| if (digitalRead(pin) == LOW) { // <- Change to '== HIGH' if pin is active high | |
| delay(50); |
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/sh | |
| #Megasaturnv 2017-06-08 | |
| while true; do sleep 30; newsbeuter -x reload -x print-unread | grep -q "^0 unread articles" && echo -n . || (echo -e "\a"; newsbeuter) ; done |
NewerOlder