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/env python | |
import sys | |
import os | |
from twython import Twython | |
consumer_key = 'INSERT YOUR KEY HERE' | |
consumer_secret = 'INSERT YOUR KEY HERE' | |
access_token = 'INSERT YOUR KEY HERE' | |
access_token_secret = 'INSERT YOUR KEY HERE' |
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 | |
(echo "Current Date & time" && date && echo && echo Serial Number && sed -n '/^Serial/{s/.* //;p}' /proc/cpuinfo && echo && echo "Uptime at" && uptime && echo && free | grep Mem | awk '{print "Free RAM in MB= "$4/$2 * 100.0}' && echo && /opt/vc/bin/vcgencmd measure_temp && echo && echo CPU Freq && cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq && echo && echo "Files in Playlist" && ls ) > file.tmp | |
/usr/local/bin/raspi2png -p "/home/pi/Pictures/screen.png" | |
if [ -s file.tmp ] |
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 | |
NOWIPADDR="/home/pi/nowipaddr" | |
GETIPADDR="dig +short myip.opendns.com @resolver1.opendns.com" | |
LOG="/home/pi/ip.log" | |
timestamp=$( date +%T ) | |
curDate=$( date +"%m-%d-%y" ) | |
if [ -f $NOWIPADDR ]; then | |
if [[ `$GETIPADDR` = $(< $NOWIPADDR) ]]; then | |
echo $curDate $timestamp " IP address check: " $(< $NOWIPADDR) >> $LOG |
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 time | |
import random | |
import datetime | |
import subprocess | |
import picamera | |
import cat | |
import telepot | |
from telepot.loop import MessageLoop | |
def handle(msg): |
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
running = True | |
while running: | |
print("1 = Addition") | |
print("2 = Subtraction") | |
print("3 = Multiplication") | |
print("4 = Division") | |
print("5 = Exit program") | |
cmd = int(input("Enter number : ")) | |
if cmd == 1: |
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
pi@raspberrypi:~ $ node -v | |
v0.10.29 | |
pi@raspberrypi:~ $ sudo su - | |
root@raspberrypi:~ # apt-get remove nodered -y | |
root@raspberrypi:~ # apt-get remove nodejs nodejs-legacy -y | |
root@raspberrypi:~ # apt-get remove npm -y # if you installed npm | |
root@raspberrypi:~ # curl -sL https://deb.nodesource.com/setup_5.x | sudo bash - | |
root@raspberrypi:~ # apt-get install nodejs -y | |
root@raspberrypi:~ # node -v | |
v5.9.0 |
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 | |
dir=/home/pi/9gag | |
cd $dir | |
rm *.png | |
9gag-rnd > output.txt | |
mv *.png 9gag.png |
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
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 |
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 | |
/bin/sleep 100 && /usr/bin/python /home/pi/telebot.py |
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
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 |
OlderNewer