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 | |
# download with this command: | |
# curl -O https://gist.githubusercontent.com/f00-/68255fe352f1e310f232259e06a4c0da/raw/7ddd7a9d85ebb20c6b1e31cca993c791f21ec6f4/script4john.sh | |
# once you have it downloaded | |
# usage: ./script4john.sh folderYouAreChecking fileYouWantTokeep | |
# be careful, make sure you specify the right folder and file | |
# you could potentially rm -rf * somewhere important |
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
:: moves cache.db to C:\tmp\ | |
:: deletes every file in C:\NCompass\NCompass Player\cache (to stop crash) | |
:: moves cache.db back to C:\NCompass\NCompass Player\cache\cache.db | |
mkdir "C:\tmp" | |
move "C:\NCompass\NCompass Player\cache\cache.db" "C:\tmp\" | |
del "C:\NCompass\NCompass Player\cache\*.*?" | |
move "C:\tmp\cache.db" "C:\NCompass Player\cache\cache.db" |
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
#https://github.com/trainman419/python-cec | |
#pip install cec | |
import cec | |
import time | |
cec.init() | |
tv = cec.Device(0) | |
while True: | |
tv.power_on() |
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/sh | |
ACCT_ID="6ptphr42" | |
LOG_FILE="/var/log/install-dp.log" | |
#Wait maximum 30 seconds on network connectivity before giving up | |
limit=30 | |
retry=0 | |
#Don't bother to run when lo is configured |
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
#https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=53481 | |
#https://github.com/Pulse-Eight/libcec | |
echo on 0 | cec-client -s -d 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
echo on 0 | "C:\Program Files (x86)\Pulse-Eight\USB-CEC Adapter\x64\cec-client.exe" -s -d 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
import smtplib | |
login = {"username": "[email protected]", "password":""} | |
mailgun = {"server": "smtp.mailgun.org", "port": 587} | |
def send_message_via_smtp(sender, reciever, msg): | |
smtp = smtplib.SMTP(mailgun["server"], mailgun["port"]) | |
smtp.login(login["username"], login["password"]) | |
smtp.sendmail(sender, reciever, 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
#!/bin/bash | |
PROMPT="pi@raspberrypi$ " | |
echo -n $PROMPT > input.txt | |
echo "ps aux | grep mono" >> input.txt | |
ps aux | grep mono >> input.txt | |
echo -n $PROMPT >> input.txt | |
echo "ps aux | grep mplayer" >> input.txt | |
ps aux | grep mplayer >> input.txt |
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 python3 | |
import smtplib | |
login = {"username":"", "password":""} | |
mailgun = {"server": "smtp.mailgun.org", "port": 587} | |
def send_message_via_smtp(sender, reciever, msg): | |
smtp = smtplib.SMTP(mailgun["server"], mailgun["port"]) | |
smtp.login(login["username"], login["password"]) |
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
# maybe move to dated folder | |
mv NCompass NCompass.old | |
# maybe a tarball instead, idk how it comes | |
curl -Os http://url.to/NCompass.zip | |
unzip NCompass.zip | |
# start updated player |
OlderNewer