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
| cd | |
| echo "PATH=$PATH:/usr/sbin:/bin:/sbin" >> .bash_profile |
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
| tuncfg | |
| hamachi-init | |
| hamachi start | |
| hamachi login |
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
| chmod 777 hamachi.sh | |
| echo "/etc/init.d/hamachi.sh start" >> /etc/init.d/rcS |
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
| class Update(webapp.RequestHandler): | |
| def get(self): | |
| botlist = db.GqlQuery('SELECT * FROM Weatherbot ORDER BY zipcode ASC') | |
| failed = False | |
| try: | |
| for bot in botlist: | |
| tweet = self.get_feed(bot.wundurl) | |
| payload = {'status' : tweet, 'source' : "tweatherbot"} |
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
| cron: | |
| - description: twitter weather forecast update | |
| url: /update | |
| schedule: every 30 minutes synchronized |
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
| class Weatherbot(db.Model): | |
| username = db.StringProperty() | |
| password = db.StringProperty() | |
| zipcode = db.StringProperty() | |
| wundurl = db.StringProperty() | |
| lastupdate = db.DateTimeProperty(auto_now = True) |
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
| def sendText(self, text, destination): | |
| ApiVersion = "2008-08-01" | |
| AccountSid = "AXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" | |
| AuthToken = "YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" | |
| account = twilio.Account(AccountSid, AuthToken) | |
| d = { | |
| 'To' : destination, | |
| 'From' : '505-609-8968', | |
| 'Body' : "Remindable: " + 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
| def sendCall(self, text, destination, id): | |
| ApiVersion = "2008-08-01" | |
| AccountSid = "AXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" | |
| AuthToken = "YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" | |
| account = twilio.Account(AccountSid, AuthToken) | |
| d = { | |
| 'Called' : destination, | |
| 'Caller' : '505-609-8968', | |
| 'Url' : 'http://remindable.appspot.com/call?id=' + str(id) |
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
| def post(self): | |
| alarm = Remindable.get_by_id(int(self.request.get('id'))) | |
| try: | |
| self.response.headers["Content-Type"] = "text/xml" | |
| self.response.out.write("<?xml version='1.0' encoding='UTF-8' ?>\n") | |
| self.response.out.write("<Response>") | |
| self.response.out.write("<Say>Your remindable has arrived! " + alarm.text + "</Say>") | |
| self.response.out.write("</Response>") | |
| alarm.delete() |
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
| mount -o rw,remount / |