This file contains 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 | |
if [ "$(whoami)" != "root" ]; then | |
echo "Run this script as sudo" | |
exit 1 | |
fi | |
apt update | |
apt -y install apache2 php5 php5-gd php5-sqlite git-core fossil screen imagemagick python-pip rsync jq | |
pip install bottle |
This file contains 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
import android, time, os | |
droid = android.Android() | |
counter = 1 | |
title = "Number of Photos" | |
droid.dialogCreateAlert(title) | |
photoCount = int(droid.dialogGetInput("Specify number of photos to take:").result) | |
title = "Time interval" |
This file contains 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
#!/usr/bin/python | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
This file contains 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
[{"id":"5b09f655.d78988","type":"openweathermap","z":"8312dc32.974a3","name":"","lon":"","lat":"","city":"Aarhus","country":"Denmark","x":363,"y":168,"wires":[["ffe6ef68.f37e"]]},{"id":"9f9af6b7.3f75e","type":"inject","z":"8312dc32.974a3","name":"Weather Today","topic":"","payload":"","payloadType":"none","repeat":"","crontab":"00 10 * * *","once":false,"x":147,"y":118,"wires":[["5b09f655.d78988"]]},{"id":"71938e7e.a647a","type":"e-mail","z":"8312dc32.974a3","server":"smtp.foobar.com","port":"465","name":"foo@bar.com","dname":"","x":778,"y":294,"wires":[]},{"id":"ffe6ef68.f37e","type":"function","z":"8312dc32.974a3","name":"Process Weather Data","func":"msg.payload = \"Weather: \" + msg.payload.detail + \", Temperature: \" + msg.payload.tempc + \"°C\" + \" Wind Speed: \" + msg.payload.windspeed + \"m/s\"\nreturn msg;","outputs":1,"noerr":0,"x":562,"y":226,"wires":[["71938e7e.a647a"]]}] |
This file contains 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
[{"id":"72aafd2f.608874","type":"exec","z":"c44f31ab.9139e8","command":"blinkstick","addpay":true,"append":"","useSpawn":"","name":"BlinkStick","x":831,"y":170,"wires":[[],[],[]]},{"id":"ba40088d.d286e8","type":"openweathermap","z":"c44f31ab.9139e8","name":"","lon":"","lat":"","city":"Aarhus","country":"Denmark","x":338,"y":173,"wires":[["a36fdbc6.490e48"]]},{"id":"95a6d5c0.afcbd","type":"inject","z":"c44f31ab.9139e8","name":"Weather Today","topic":"","payload":"","payloadType":"none","repeat":"600","crontab":"","once":true,"x":112,"y":81,"wires":[["ba40088d.d286e8"]]},{"id":"a36fdbc6.490e48","type":"function","z":"c44f31ab.9139e8","name":"Process Weather Data","func":"if (msg.payload.weather === \"Clear\") {\n msg.payload = \"--repeats 51 --pulse green\"\n return msg;\n}\n\nelse if (msg.payload.weather === \"Broken clouds\") {\n msg.payload = \"--repeats 51 --pulse yellow\"\n return msg;\n}\nelse if (msg.payload.weather === \"Rain\") {\n msg.payload = \"--repeats 51 --pulse red\"\n return msg;\n}\n |
This file contains 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
[{"id":"19cbb03a.2ecd3","type":"twitter in","z":"4c5513ea.a4813c","twitter":"","tags":"","user":"false","name":"Mentions","topic":"tweets","x":177.16668701171875,"y":251.16665649414062,"wires":[["4bdfd1e1.404698"]]},{"id":"640bfbf0.4399d4","type":"e-mail","z":"4c5513ea.a4813c","server":"","port":"465","name":"Email","dname":"","x":756.1666870117188,"y":295.1666564941406,"wires":[]},{"id":"4bdfd1e1.404698","type":"function","z":"4c5513ea.a4813c","name":"Modify message","func":"msg.topic = msg.topic.replace(\"tweets/\", \"Twitter mention by \");\nreturn msg;","outputs":1,"noerr":0,"x":450,"y":201,"wires":[["640bfbf0.4399d4"]]}] |
This file contains 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 | |
uuser="unsplash_user_name" | |
path="path/to/dir" | |
size=$(xdpyinfo | grep dimensions | awk '{print $2}') | |
curl "https://source.unsplash.com/user/$uuser/$size" --location --output $path/unsplash-random.jpeg | |
gsettings set org.gnome.desktop.background picture-uri file://$path/unsplash-random.jpeg |
This file contains 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 | |
ping -c1 google.com &>/dev/null | |
if [ $? -eq 0 ]; then | |
IP=$(ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p') | |
curl "https://dweet.io/dweet/for/$THING?IP=$IP" | |
fi |
This file contains 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 | |
latlon="geo:"$(xclip -o | tr -d ' ') | |
notify-send $latlon -i info | |
echo $latlon | xclip -selection c |
This file contains 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 | |
#OPTIND=1 | |
while getopts "h?sdyar" opt; do | |
case $opt in | |
s) exiftool -directory=%e . | |
;; | |
d) exiftool -d %Y%m%d-%H%M%S.%%e '-FileName<DateTimeOriginal' -r . | |
;; | |
y) exiftool '-Directory<CreateDate' -d %Y-%m-%d -r . | |
;; |