AWS S3 Download Bucket Folder

Currently, AWS web console not provide folder downloading. We can use s3cmd or s3Browser for this purpose. s3Browser is a freeware Windows client for S3 and CloudFront. s3cmd download Bucket folder: s3cmd sync s3://bucketname/folder /local/folder For download files using s3Browser, here is a tutorial. Uploading and Downloading Files to and from Amazon S3

May 28, 2013 · 1 min · oopsmonk

Web Micro Framework Battle

WSGI Micro Framworks 這陣子一直在找適合的Micro Framwork玩第一次的Web Application. 最後選擇用Bottle, 原因是: Single file module, no dependencies with other library. Document 但是好不好用又是另一回事, 用了就知道..XD 以下是由WSGI.org列出的Micro Framwork: bobo Bobo is a light-weight framework. Its goal is to be easy to use and remember. Bottle Bottle is a fast and simple micro-framework for small web-applications. It offers request dispatching (Routes) with url parameter support, Templates, key/value Databases, a build-in HTTP Server and adapters for many third party WSGI/HTTP-server and template engines....

May 27, 2013 · 1 min · oopsmonk

Pandoc's Markdown Reference

Headers (Setext and atx) Setext-style只有兩階也就是HTML語法裡的h1及h2 tag,-跟=的個數沒有限制. atx-style共有6階, h1~h6. # This is H1. ## This is H2. ### This is H3. #### ... ###### This is H6. 除了階層較多之外, atx-style還可以使用Markdown syntax. ###This is *H3* header. Output: This is H3 header. Inline Formatting Basic Emphasis 斜體字: *, _ , 粗體字: **, __, *single asterisks* _single underscores_ **double asterisks** __double underscores__ Output: single asterisks single underscores double asterisks double underscores Pandoc Inline strikeout, superscript and subscript ~~~deleted text~~~ H~2~O is a liquid....

May 23, 2013 · 7 min · oopsmonk

uWSGI & Nginx on Ubuntu

Install uWSGI Configure uWSGI $ sudo apt-get install python-dev python-pip $ sudo pip uwsgi ################# uWSGI configuration ################# pcre = False kernel = Linux malloc = libc execinfo = False ifaddrs = True ssl = True matheval = False zlib = True locking = pthread_mutex plugin_dir = . timer = timerfd yaml = True json = False filemonitor = inotify routing = False debug = False zeromq = False capabilities = False xml = expat event = epoll ############## end of uWSGI configuration ############# *** uWSGI is ready, launch it with /usr/local/bin/uwsgi *** Successfully installed uwsgi Cleaning up....

May 21, 2013 · 1 min · oopsmonk

About Markup

Markup Language 寫文件或blog最困擾的就是排版, 大略看一下目前較流行的Markdown & reStructuredText, 決定用Markdown來寫, rst給我的感覺就是要再學另一種語言, 雖然強大, 但我只要夠用就好, 必竟都有人用Markdown寫書了 XD. Markdown Setup 目前是用Vim + Pandoc來寫Markdown, 網路上也有Web editor, 或是windows平台的Markdownpad, 但Web用起來不順手, Markdownpad不能跨平台. 用Vim麻煩的是preview, 寫完要手動用Pandoc轉成html, 之後直接將轉出來的html, 直接貼到blogger. 一般沒有CSS的用法: $ pandoc README.md -o out.html 加入CSS依文件的方法是: $ pandoc -c markdown.css README.md -o out.html 但是會有一個問題, 貼上blogger時會無法正常顯示, 原因在於html裡是這樣寫的: <link rel="stylesheet" href="markdown.css" type="text/css" /> 後來想到了一個workaround, 用-H參數將CSS放入Header, 但也不是直接帶入, 需要將一般的CSS file用style tag包起來, 如下: <style type="text/css"> Your CSS syntax.... </style> 另存成pandoc-markdown.css, 如此才是真正的__fully standalone__. $ pandoc -H pandoc-markdown.css README.md -o out....

May 21, 2013 · 1 min · oopsmonk

OpenNMS Architecture Introduction (Discovery & Monitor)

O.S. : Ubuntu12.04 LTS OpenNMS Version : 1.10.7 OpenNMS base on TMN & FCAPS network management models. OpenNMS Block Diagram Discovery & Monitor daemons Eventd Event handling daemon Configuration files: eventconf.xml -> Defines the UEI (Universal Event Identifiers). eventd-configuration.xml -> Defines operating parameters for eventd such as timeouts, listener threads and listener port. events-archiver-configuation.xml -> Configuration for event archive daemon. events.archiver.properties -> Fine tune events archive subsystem. etc/events/*.xml -> Vendor UEI define files....

February 3, 2013 · 2 min · oopsmonk

Baking 2012

結束上份工作後, 不想閒著, 也就開始找新"玩具", 做麵包好像滿有趣的, 又不用出門可以在家陪小朋友,於是爬了2~3天的文章,了解需要的東西. Google什麼是yeast(Active dry, Instant dry, Fresh)? 什麼是麵粉(高筋, 中筋, 低筋, 法國粉)? 什麼是麵糰(擴展, 完成)? 什麼是揉麵? 天真的以為"吐司"很簡單,麵糰整好丟進烤模..done. 結果烤到第五條吐司, 才__接近滿模__. 失敗品之一: 接著白吐司太無聊了, 所以做了其它嚐試 全麥鮪魚麵包 高粉 270g 全麥粉 30g Instant dry 3/4t 奶油 20g 塩 1/2t 糖 20g 水 185g 整形參考: 蒔蘿鮪魚麵包 海蒂的白麵包 配方跟做法參考 【肉桂打噴嚏】海蒂的白麵包 全麥豆漿枸杞葡萄乾 高粉 270g 全麥粉 30g Instant dry 3/4t 奶油 20g 塩 1/2t 糖 20g 豆漿 185g 枸杞 + 葡萄乾 適量. No-Knead Bread 做了這些後, 深深感到… 萬能的雙手真的累人又吵, 尤其吐司要揉到完成階段....

November 30, 2012 · 1 min · oopsmonk