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 time zone | |
| sudo dpkg-reconfigure tzdata | |
| ** update software | |
| sudo apt update && sudo apt upgrade -y | |
| sudo apt install linux-image-c2 -y | |
| and change from <Yes> to <No> in the upcoming dialogue: | |
| *** install mail utils | |
| sudo apt-get install mailutils ssmtp -y && sudo apt-get install dnsutils -y && sudo apt-get install libpng12-dev -y && sudo apt-get install mutt | |
| *** config smtp servers |
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
| 1 – Disabling the blank screen once | |
| You can disable the blank screen once with the following command line instructions: | |
| $ sudo xset s off | |
| $ sudo xset -dpms | |
| $ sudo xset s noblank | |
| xset s off disable the screen saver, xset -dpms disables the DPMS (Display Power Management Signaling) and xset s noblank tells to X server to not blank the video device. | |
| 2 – Disabling the blank screen forever |
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
| wget "https://api.dynu.com/nic/update?hostname=example.dynu.com&myip=198.144.117.32&myipv6=2604:4400:a:8a::f4 | |
| &username=someusername&password=somepassword" |
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
| http://pillow.readthedocs.io/en/3.4.x/installation.html |
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
| from distutils.core import setup | |
| import py2exe | |
| setup( | |
| options = {'py2exe': {'bundle_files': 1, 'compressed': True}}, | |
| windows = [{'script': "winbot2.py"}], | |
| zipfile = None, | |
| ) |
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
| import time | |
| import random | |
| import datetime | |
| from PIL import ImageGrab | |
| import telepot | |
| from telepot.loop import MessageLoop | |
| def handle(msg): | |
| chat_id = msg['chat']['id'] | |
| command = msg['text'] |
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
| <script start> | |
| #!/bin/sh | |
| while true; | |
| do | |
| pgrep -f telebot.py || nohup python /home/pi/telebot.py >> telebot.out | |
| done & | |
| <script End> | |
| To convert windows sh file name to unix file name - |
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
| sudo apt-get install python-pip -y | |
| sudo pip install telepot | |
| git clone https://github.com/AndrewFromMelbourne/raspi2png/ | |
| sudo cp -a raspi2png/raspi2png /usr/local/bin | |
| sudo apt-get install imagemagick -y | |
| sudo nano telebot.sh | |
| <python script as below--start> | |
| import time | |
| import random |
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 | |
| /bin/sleep 100 && /usr/bin/python /home/pi/telebot.py |
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
| git clone https://github.com/AndrewFromMelbourne/raspi2png/ | |
| sudo cp -a raspi2png/raspi2png /usr/local/bin | |
| raspi2png -p /home/pi/screenshot.png | |
| Usage: raspi2png [-p pngname] [-v] [-w ] [-h ] [-t ] [-d ] | |
| -p - name of png file to create (default is snapshot.png) | |
| -v - verbose | |
| -h - image height (default is screen height) | |
| -w - image width (default is screen width) | |
| -t - type of image captured |