Posts

Get Images Bookmarklet

I wonder why all Internet browsers do not provide us with a built-in and simple way to download multiple images, such as those excellent photos from my favorite Boston.com's The Big Picture . The closest thing that fit my need is Bulk Image Downloader and Firefox Extensions ( Image Picker ). The thing is, I certainly don't want to pay for something that can be free, and secondly, I don't use Firefox as my primary Internet browser (Hail Opera!) My first plan was to make an Opera extension similar to Firefox's Image Picker, which basically read a page, select the images and then call the built-in download manager to save it to local folder. However, I'm having a real hard time finding the Opera API function to call the Opera download manager to download even a single url. So, I end up writing just this simple bookmarklet to grab the images url, and execute Free Download Manager to perform the download. For now, the bookmarklet only extract direct source url of ima...

FBNotify.py

#coding=utf-8 #FBNotify.py: Facebook Simple Notifier # by Herry Limantoro (mataherry@gmail.com) # #NOTE: Don't forget to Add the Mechanize source folder into your SL4A scripts folder (/mnt/sdcard/sl4a/scripts) # http://wwwsearch.sourceforge.net/mechanize/download.html import android import time import sys import traceback import urllib import mechanize import BeautifulSoup import re droid = android.Android() #Setup Browser br = mechanize.Browser() br.set_handle_redirect(True) br.set_handle_robots(False) #User Agent, can't do without it br.addheaders = [('User-agent','Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1')] url = 'http://m.facebook.com/notifications.php' #Set username password here, leave blank to prompt for username/password username = '' password = '' #Set run interval (in minutes), prompt if 0 interval = 0 def get_interval(): droid.dialogCreateAlert('R...

Android Facebook Simple Notifier using SL4A

Image
Like many Android phone users, I wonder why the Android Market Facebook app lacks push notifications like BB or iPhone. Currently it only notify when there is new message, or event and friend request. So, when I get acquainted with SL4A , this is the first app pop up in my mind. However, reading through the Facebook API and having to handle oAuth and stuffs seem just too much work. So, I thought if only I could open my mobile version of FB notification page ( http://m.facebook.com/notifications.php ) and read the new notifications, that would do it. And upon googling on emulate browser using python, I found these two excellent tutorials: http://stockrt.github.com/p/emulating-a-browser-in-python-with-mechanize/ http://www.ibm.com/developerworks/linux/library/l-python-mechanize-beautiful-soup/  I guess the neat trick is to "disguise" the User Agent of the mechanize Browser. From there on, it's basically parsing the HTML source behind the notification page. One last bit ...

Past Present Future

Menghadapi Ketidakpastian

Seringkali kita sangat sulit mengakui bahwa "Sempurna" hanya ada di Surga. Selalu saja ada masalah untuk setiap orang. Selalu ada tantangan finansial. Selalu ada beban dalam rumah tangga, atau krisis yang lain. Setiap hari dalam kehidupan kita di dunia ini, ketidakpastian selalu datang mengetuk di depan pintu. Kebanyakan kita berpikir apabila kita mengerjakan segala sesuatu dengan sungguh-sungguh, maka segalanya akan berjalan dengan baik, rapi, dan teratur. Tetapi kenyataannya banyak hal yang terjadi di luar perhitungan kita. Dalam Matius 8:23-24, "Lalu Yesus naik ke dalam perahu dan murid-murid-Nyapun mengikuti-Nya. Sekonyong-konyong mengamuklah angin ribut di danau itu..." Beberapa pertanyaan yang mungkin muncul dalam benak kita: 1. Apakah Yesus tidak mengetahui ramalan cuaca? Dia tahu bahwa angin ribut (badai) akan datang, tetapi dia tetap membawa murid-muridnya naik perahu. Dia seakan-akan "sengaja" membawa mereka menghadapi badai. 2. Bukankah Yesus b...

Sermon Links

Stephen Tong's Sermon (English translation) http://stephentongsermons.blogspot.com/ Sermons by John McArthur, Chuck Swindoll, R.C. Sproul and many more http://www.oneplace.com/

Programmatically Start/Stop Windows Service

Source: http://www.dotnetspider.com/resources/865-How-start-stop-windows-services-programmati.aspx [C#] using System.ServiceProcess; // add .Net Reference to Project ServiceController controller = new ServiceController(); controller.MachineName = "."; controller.ServiceName = "MySQL"; string status = controller.Status.ToString(); // Stop the service controller.Stop(); // Start the service controller.Start();