Sugree

skip to navigation

Weekly Suki - a podcast powered by Drupal

ทำ Weekly Suki มา 3 สัปดาห์แบบมั่วๆ ซั่วๆ เมื่อวานพึ่งปรับเปลี่ยนให้เข้าที่เข้าทางมากขึ้น เนื่องจากไม่ได้เก็บ mp3 ไว้เอง ด้วยความขี้เกียจ และอยากเป็นตัวอย่างให้เห็นว่า ทำ podcast ไม่ต้องใช้อะไรพิเศษ แค่มี Drupal ก็เกินพอ

ทีนี้ลองมาดูว่าผมปรับอะไรไปบ้าง

Submitted by sugree on Fri, 09/05/2008 - 08:38.

When I grow up, I want to become...

Yesterday, school asked my son to fill a portfolio form. The last question and my son's answer are:

When I grow up, you want to become a programmer because everyone in my home are programmers.

Probably I should change my career.

Submitted by sugree on Fri, 09/05/2008 - 08:33.

Tweet to Text 3

It seems Python on non-linux platform, e.g., Mac and Windows, doesn't support Unicode so well. I added another option to specify target encoding if necessary and the default encoding is 'utf-8'. This patch is against Tweet to Text 2.

diff --git a/track.py b/track.py
index e651f51..1842e61 100644
--- a/track.py
+++ b/track.py
@@ -52,6 +52,9 @@ class App:
         parser.add_option('-p', '--pages',
                           default=4, type='int', dest='pages',
                           help='max pages')
+        parser.add_option('--encoding',
+                          default='utf-8', dest='encoding',
+                          help='output encoding')
 
         self.options, self.args = parser.parse_args()
 
@@ -81,7 +84,8 @@ class App:
 
         history.reverse()
         for i in history:
-            print format_tweet(i)
+            tweet = format_tweet(i)
+            print tweet.encode(self.options.encoding, 'replace')
 
         if verbose:
Submitted by sugree on Thu, 09/04/2008 - 12:39.

Photo Lullar Bookmarklet

I am trying to teach myself how to make a bookmarklet. This is a good chance to make a simple bookmarklet. Please try this simple bookmarklet on any Hi5 profile. Just drag below link to bookmarks toolbar. Note that you need Firefox.

The code is very simple and short.

javascript:(function(){ window.open('http://photo.lullar.com/?q='+encodeURIComponent(location.href)); })();
javascript:(function(){ location.href='http://photo.lullar.com/?q='+encodeURIComponent(location.href); })();
Submitted by sugree on Thu, 09/04/2008 - 10:46.
123456789next ›last »

Main menu

Popular Tags

Twitter Flickr Tumblr Google Reader Youtube Multiply Facebook 43things Ohloh Thai Computer Engineering Thai Web Master LinkedIn Pownce blip.tv slideshare Hi5 Dopplr Technorati Jaiku FriendFeed del.icio.us Digg MyBlogLog StumbleUpon last.fm Picasa Orkut

debian
apache
drupal
drupal.in.th
feedburner