[Python] ANSI escape code
example:
print ’033[33;46;1m’ + ‘some red text’
033[ = ESC , escape code
因為需要可以隨身帶著走的系統,所以找了一些資料。
作業系統: 使用 LinuxMint 11(Katya) Ubuntu (natty) LXDE 版,把隨身碟當成一般的硬碟安裝
需求: GUI,預先安裝好一些軟體,可以寫入存放個人設定(所以不考慮unetbootin這類的程式,略過)。教學資源文件較多
Windows系統的OS (TODO:補充Win的 OS)
Linux系的OS
BSD系的OS
分割區系統: ext2, 分 / , 和 /home , 和 swap(1G)
一般情形下還滿順的,但是在一些RAM較小的機器,跑一段時間以後,速度就會變的很慢。
資料分類
系統設定
(TODO: 把下面的類似記錄的部分,切到另一篇)
依System Menu分類
Accessory
Graphics
Internet
Office
Programming
Sound & Video
利用自動下載 /r/wallpaper 上的桌布,用一個shell script 設定
pcmanfm 設定桌布的功能,預設是 2 分鐘換一次桌布。
Ref:
安裝 http://code.google.com/p/python-twitter/ 0.8.2
認證方式是在環境 變數中設 username, password,或是
設 .tweetrc
[Tweet]
consumer_key: *consumer_key*
consumer_secret: *consumer_password*
access_key: *access_key*
access_secret: *access_password*
上面的key要自己 去 twitter.com建新 app,打開read,write的權限 ,
ok
用 了一段時間的 vimrc, vimfiles 也是變的越 來越 雜亂,打算重新 整理 一下。
Vimana
使用 Perl寫成管理程式
Pathgen
vim的plugin,個別的plugin存 在 .vim/bundle下自 已的目錄下,方便 管理
vundle
類似pathgen的程式,
ep.io 很久之前申請的帳號,正好之前試過了python版的heroku,來試試ep.io ,比較一下有什麼不同。
參考文件 ep.io quickstart
1. ep.io 提供的client,認證
pip install epio epio upload_ssh_key
2. 建立app (Django,flask, WSGI)
目前有三種可以選,這邊試試flask
https://www.ep.io/docs/quickstart/flask/
並在本機上測試一下
3.上傳app
epio create mytest(想 要的app名字 ) epio upload (上傳)
理 論上就可以在 http://mytest.ep.io 上看到你寫好 的app
Ref:
一些 Paas 的比較
check: support language, upload(git,hg…) , free quota,support service(Database,etc),client
Heroku
support language: ruby,python,java,node.js,clojure,scala
service:pgSQL,Facebook
client: gem install heroku
Ep.io
support language: python
service: pgSQL,Redis(database),Solr(search engine),django
client: pip install epio
Google App Engine
support language:python,java,go!
Service: Database(google BigTable)
Client: AppEng SDK
Ref:
Paas,Iaas,Saas
WSGI
The Web Server Gateway Interface (WSGI) defines a simple and universal interface between web servers and web applications or frameworks for the Python programming language. from Wikipedia,PEP 3333
Python定義網頁程式和伺服器溝通的介面
概念相同的有,Ruby Rack , Perl PSGI
python -m SimpleHTTPServer
簡單的 http server
http://127.0.0.1:8000 or
http://localhost:8000