[Ubuntu] Reading LIT File

Monday, April 23, 2012 0 Comments

Today, I've been confused by a lil file with *.lit extension. After did a google for a second, finally I know if *.lit file is proprietary extension, like usual, work under win-thing. The file I've talking about is an ebook file, in *.lit format. Damn. So irritating.

I've watched and found some command-line way, but I just dont like the way they 'hack' it. I'm GUI man :D At least, for something easy (I just wanna read the ebook!) like this, should I use command line? Using script? Nope thank you. I believe there must be always another way. Like what I wrote here :P

So, here is another way. The logic is, in Windows environment, there should be a reader. So, I just search it and I got it already, Microsoft Reader.

Tadaaa : Prime Time

Umm.. better if I serve the steps this way :

  1. I assumed you've already installed wine. It's a must. Download the Ms-Reader installer file here
  2. Once you've downloaded it, installed it thru' wine.
    Note : usually you must do 'chmod +x' first to the file to make it executable before you can run it
  3. If it's installed already, we cann't use it yet. Just a lil bit longer. We need to hack it first. Blame Microsoft for the damn-activate-thing.. >.<
  4. We need no get a file called msvcirt.dll in order to make the reader work. Get it here http://www.dll-files.com/dllindex/dll-files.shtml?msvcirt or if you wanna get your own way, google it.
  5. Next, just extract the file you've download and dump it into /home/your_username/.wine/drive_c/Program Files/Microsoft Reader/
    *change your_username with your computer username of course.
  6. And done! Here we go.. :P

Ana Walang Mencok Nang Dhong Pelem

Sunday, April 22, 2012 0 Comments

Minggu April 22, 11.07 AM
Masih di dalam kamar kosan yang panas minta ampun *berbeda dengan ketika di kantor yang ber-AC*, menikmati hari Minggu yang sepi *halah*

.. Ana walang kayu mencok nang (go)dhong pelem di depan kos. Mengingatkanku dengan suasana udik nun jauh di sana :D Sebagai orang berdarah Gunungkidul yang kurang tahu seluk beluk Gunungkidul itu sendiri, padahal besar dan *pernah* menempuh hidup di Gunungkidul, saya sudah akrab dengan yang namanya walang (Indonesia : belalang). Siapa juga yang tidak kenal dengan makanan favorit warga Gunungkidul ini.. Ya.. makanan. Terdengar aneh? Jangan heran. Bahkan ulat pohon besi (nama kerennya pohon ulin) saja menjadi makanan musiman yang digemari dan banyak dicari. Masing masing daerah punya kekhasan tersendiri sih ya :)

Walang.. Lagi lagi makhluk itu mengingatkanku ketika jaman saya masih sekolah. Meski banyak diburu, tapi saya adalah pengecualian :D Saya tidak doyan walang. Bukannya jijik atau apa. Tapi karena masalah alergi. Ya, efek samping walang adalah seperti udang. Dan memang rasanya seperti udang sih *katanya yang makan* Umm... sebaiknya diluruskan dulu. Jadi gini,,, *hening* saya dulu termasuk penggemar walang. Apalagi kalau dimasak pedas manis khas nenekku *tidak ada yang menandingi*, saya bisa bolak balik dapur nyomotin belalang :D

Dan ya, itu dulu,,, Duluuu.. sekali. Sampai di suatu titik saya ketika mengalami masa yang paling WOW. Jatuh dari motor, nabrak pohon waru dalam session learning-driving-motorbike-by-live-trying.. Padahal waktu itu mboncengin my-older-brada, yang notabene sebulan lagi mau nikahan :D

[SOLVED] Hibernate on Ubuntu with ASUS A43E

Saturday, April 21, 2012 0 Comments

This afternoon (4.07 PM, GMT +7), I am playing with my ASUS Laptop. This time, I still wonder why this laptop can not hibernate properly. My prob was after clicking hibernate button, it is hibernating like usual, but when the resume time, it just gimme blank screen. And it means, sadly, I've got to hit the power button. So far, I used to just suspend the machine. But I'm not satisfy with just suspend! I need more. Let's say, I've a hibernate button and it's useless. So, what the purpose of it? An accessory? Grrrr.. Don't say this is an April fool, since on my ACER netbook the hibernate works great.

What I dislike of suspend is, it's consuming battery so much.. It's like not different than when it's not suspended. Grrr..

I've been googled in my free time. Do some hacks, based on their solution, till I was bored because still not worked. But then, this day God gimme a way. For you guys, the key is keep searching/ asking.. :)

The Solution

Exactly, I can't post the proper solution here because of the hardware/ others reason. But, here you are, my savior link. Might be it could be useful for you who facing the same issue as me. Just, I dont guarantee  it will work on you. Like I said, depends on your machine spec or other reasons. Just dont give up and keep trying! :)

Note : My OS is exactly Linux Mint 11 'Katya'. But, I called 'Ubuntu' since Mint is its derivative..

[Solved] updateAll cakePHP unable to fire callback

Tuesday, April 17, 2012 0 Comments

Still on logging sql-queries to database. This day, I was stuck on updateAll that was unable to fire callback afterSave(), not like normal update using save(). I thought my scripts was wrong -and yeah it was, even just a lil. And, damn, it still doesn't work! The other, delete and insert are normal. I mean, it's executed and written in log table like expected. In my case, the updateAll() is just executed and nothing happen in log table.

I still had positive-thinking about 'there was something wrong within my script' that I still don't know what is it. Had a thought what if updateAll() is not firing the afterSave callback, so I did a lil bit experiment. Just say it try-and-error. 

So, finally my thought about 'afterSave() is not fired by updateAll' was strengthen. I was so sure if indeed it was. And, I did googling and tadaaa.. By default, yes, updateAll() is not designed to fire callback because of security reason. 
This is by design. Since updateAll can take any SQL expression for updating conditions its not possible to know for which individual records to run the callbacks without adding lot of overhead like first doing finds and making list of ids of records that will be updated.

http://cakephp.lighthouseapp.com/projects/42648/tickets/2459
Clear enough. But like @mark_story told me :
Of course, its just PHP,,,


That means,, everything is possible :D What did I do? Let's go to the how-to section..

Accessing Session Variables in Model

Tuesday, April 17, 2012 1 Comments

This early morning (right now based on Indonesia time GMT+7, it's 8.18 AM), I've been preparing my to-do-list to be done later in my office associated with my countdown-project. It's all about to log every query executed by user action (create/ add, edit and delete) to database by using cakePHP. I've been spending a lot of time on searching the snippet or at least what-kind-of-function-I-must-used-to, and not find my need yet.

Yesterday, since I've found the how-to, based on the link I've found on Stackoverflow and edited it to be like what I want (read : need), I still have to do a lil bit experiment.

It's like this title's post. Accessing session variables in Model. Is that possible? Come on,, it's just PHP. Anything possible.

Another English Post

Monday, April 16, 2012 0 Comments

It's been a long time for the last time I wrote English post. *So what?? Does it matter?* At least, all the words are in English -- with exclusion, whether the grammar is correct or not :D Never mind. I just enjoy it. I mean, I never write a long paragraph in English, but just this blog :D Anyhow, this is my blog. Even if I mixed the language on writing the post, it's OK..

Revealing The Secret

Internet. I can't live without internet, even on writing a (-n English) post. I mostly show off, 'hey,,, my blog has English post' or similar. Kinda prestige :D And its because of the internet, I could translate some difficult words in Indonesian into English. Exactly, I have very very very poor vocabulary. So, Google Translate is my best friend ever after (and I'm believe it's everyone's secret too :D). Just still don't get it when people is lauding me with something "Thank you, you're like my walking-dictionary (mobile dictionary)" or bla bla bla.. Just often thinking of their reaction : "poor 'em.., never realized Google Translate".. :D

The other reason of why I am writing a post in foreign-language is, I'd like to hide some facts/ emotions inside the sentence.. Common Indonesian people are lazy (read : not-interested) on English post. And I use it well :D Read it or leave it 8) Something like, "Hey,, it's your fault to not understand it". I mean, English is global language, isn't it? But, if the case is they're not interested because it's my post, just dunno. Don't care so much. :D

Another point, hey, I'd like someone outside Indonesia, could comment on my blog. At least, that's the way I go-international :D

So,, that's it :D

Email Aliasses

Sunday, April 15, 2012 0 Comments

Mempunyai banyak email di satu sisi memang menguntungkan sih.. Tapi juga terkadang merepotkan. Jujur, saya sendiri mempunyai beberapa akun email juga, dengan tujuan pemakaian yang berbeda-beda. Ada yang untuk khusus untuk kerja, ada yang karena sejarahnya udah dipakai lama, ada juga yang untuk umum. Tapi, secara keseluruhan, yang sering saya pakai ada 3 :D Umum, kerja dan yang satu untuk testing aplikasi..

Pemakaian email yang banyak juga bisa juga terjadi dalam kasus banyaknya akun social media yang dipunyai/ di-manage. Sudah bukan rahasia lagi kalau satu orang mempunyai banyak akun twitter dan/ atau Facebook. Saya jangan ditanya :) Apalagi bagi orang yang bergelut dalam online-business. Yang saya coba tekankan di sini adalah bagaimana kalau kita ingin mempunyai banyak akun social-media? Apakah harus selalu membuat satu akun email untuk setiap akun social-media yang baru? Sebagian kita (bahkan saya sendiri tadinya juga begitu) pasti berpikir iya. Satu email untuk satu akun social media. Tapi saya yakin dengan membaca judul postingan ini, sudah bisa tertebak maksud saya :D

Tetap simak, untuk mengetahui 'how-to section'-nya :D

Menghilangkan Kantuk ala Saya

Monday, April 09, 2012 2 Comments

Sebelum masuk ke topik, ijinkan saya memberikan sedikit preamble terlebih dahulu. Kali ini, saya akan menyajikan sebuah posting yang menggunakan per-saya-an. Sekian.

Mengantuk? Sepertinya bukan barang baru lagi bagi kita. Semua orang pasti mengalaminya. Dan mengantuk yang akan dibahas di sini bukanlah sembarang mengantuk. Ini perihal mengantuk ketika di tempat kerja.

Nah, posting ini akan menjadi saaaangat special, mengingat yang akan menjadi nara sumber adalah saya sendiri, the best sleepy head. Sekali lagi, batasannya adalah mengatasi rasa kantuk di tempat kerja. Mengingat saya kurang bisa menahan kantuk kalau sudah di kosan (di luar jam kerja atau lebih tepatnya di jam jam istirahat di kosan).

Mari disimak..