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
| # Note – this is not a bash script (some of the steps require reboot) | |
| # I named it .sh just so Github does correct syntax highlighting. | |
| # | |
| # This is also available as an AMI in us-east-1 (virginia): ami-cf5028a5 | |
| # | |
| # The CUDA part is mostly based on this excellent blog post: | |
| # http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/ | |
| # Install various packages | |
| sudo apt-get update |
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 telnetlib | |
| import sys | |
| import Account #My file. It contains Account.id, Account.password | |
| import time | |
| tn = telnetlib.Telnet('ptt.cc') | |
| time.sleep(1) | |
| content = tn.read_very_eager().decode('big5','ignore') | |
| print("首頁顯示...") | |
| if "請輸入代號" in content: | |
| print("輸入帳號...") |
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 | |
| # | |
| # tomcat7 This shell script takes care of starting and stopping Tomcat | |
| # | |
| # chkconfig: - 80 20 | |
| # | |
| ### BEGIN INIT INFO | |
| # Provides: tomcat7 | |
| # Required-Start: $network $syslog | |
| # Required-Stop: $network $syslog |