Agaw-liwanag
Oct 18
Top of my head emo, home, rant No Comments
The camera phone might not have captured it properly but the picture below is meant to capture the dusk of a stormy day.
More
Thoughts from my head, published to the web. Punishment for people like you who have nothing better to do.
Oct 18
Top of my head emo, home, rant No Comments
The camera phone might not have captured it properly but the picture below is meant to capture the dusk of a stormy day.
More
Oct 13
Laboratory, Technology container, docker, tip No Comments
Running docker frequently can lead to mysteriously disappearing space. I kid, its not mysterious. Each image builds a layer which in turn eats up space. Logical but PITA!
Put this in your .bashrc or run it as cron on your docker host to clean up.
docker rm -v $(docker ps -a -q -f status=exited)
docker rmi $(docker images -f “dangling=true” -q)
or do it in one alias (use at your own discretion)
alias docker_janitor='docker rm -v $(docker ps -a -q -f status=exited);docker rmi $(docker images -f “dangling=true” -q)'
sounds too easy..
ciao!
Oct 07
FLOSS floss, Linux, Tech, troubleshooting, ubuntu No Comments
Last weekend I reinstalled my Linux system (and not because I want to rename it as Pyg!) which is a very bad decision as it is the same time that my pitiful internet connection fails to transmit any data beyond a few bytes. The new install to Ubuntu 15.04 (Vivid Verve) gave me the confidence to start using btrfs which is being touted as the next generation file system for linux systems. Bad move and very short-sighted on my part. 🙁
The btrfs is supposed to provide enhancements to ext4 file system since it (btrfs) is built from the ground up but with the useful features already present in ext4. The ext4 filesystem is basically being viewed as an aging hack on a hack since it builds on ext3 which is a tack-on improvement for ext2. Btrfs might be delivering on some of its promised features but those who use it should still be wary of it as it is still not considered as ready for “production” or real-world use[1]. I wish I knew this before I chose it as the filesystem for my home directory. 🙁
For those that will have the misfortune of encountering it, the gist of my predicament follows (which is based on how I remember it):
A start job is running for /home… (10s /no limit)
It was unnerving for me since a reinstall means I would need to re-download the upgrade packages on my #@$@#$ Smart LTE connection. The light-bulb moment for me was that /home is the only partition in the sequence that is using btrfs. The working theory is something borked during the forced shutdown which should have been handled by the journalling features. Thanks to an alternate albeit slow alternative connection, I was able to google enough to do the following:
# mount -o remount,rw /
# btrfsck /dev/sda4
# btrfsck --repair /dev/sda4
The repair option is always accompanied by a cautionary warning as it can delete information so having a proper backup is recommended. In my situation that is like adding salt to the injury. When I ran the repair option it reported that the cache and super generation areas do not match and that it cleared the space cache. After doing so I ran another btrfsck on the partition and rebooted the system which thankfully landed me on a working system with no (identified) data loss.
The moral of the story is to select btrfs only for the filesystems that you can afford to lose data; or have a good backup scheme. Using it for /tmp is going to be an overkill but to each to his own. Now Im thinking if I want to convert my home partition back to ext4. 😀
ciao!
[1] https://www.wikivs.com/wiki/Btrfs_vs_ext4
Jun 28
Garbage language nazi, rant No Comments
Tagalugin ko para mas magkaintindihan.
Kung sa pagmamalaki sa iyong anak ay ipinangangalandakan mong siya ay “Top One” ay ibig sabihin ay TANGA KA. Oo matalino ang anak mo pero kitang-kita na di nagmana sa iyo. Mabuti na lang mareremedyuhan pa yang katangahan na yan. Maipapayo ko sumabay ka pag grammar ang lesson. Mas mahaba lang sabihin pero subukan mong sabihin na “Top of the class” ang iyong anak.
Ngayon kung sakaling di naman siya ang nangunguna pero kasama sa grupo ng mga nangununa sa kanilang klase ay huwag mo naman sabihing halimbawa na “top three” ang anak mo. Hindi naman triplets yan kasi di mo naman sinabing “mga” anak mo. Third of his/her class ang tamang pananalita na kailangang gamitin, o kung ano mang pwesto ang kinabibilangan nya. Pwede din sabihin na “kasama siya sa top five” kung gusto mong magpakumbaba at hindi tahasang sabihin kung ano ang pwesto ng anak mo (pwedeng siya ang una o pang-lima). Pero pakiusap, itigil na sana sa ikasampu. Kung lagpas na sa sampu ay wag ng ipagpilitan para lang makapagyabang. Suportahan mo na lang ang anak mo kung gusto nyang umabot at mapabilang sa “top ten” ng klase nya.
Huwag din sanang tawaging valedictorian o salutatorian ang inyong mga anak kung di naman pa siya graduating o gumradweyt ng elementary o high school. Meron lang iilang lebel o baitang ng pag-aaral na pwedeng gamitan nito. Saka ang valedictorian ay yung taong nagbibigay ng talumpating pamamaalam (valedictory coming from the root word valedictum o “pertaining to leave-taking”) habang ang salutatorian naman ang nagbibigay ng talumpating panimula (salutation). Nagkataon lamang na sa Pilipinas ang top two sa nakuhang grade point average ang binibigyan ng karangalan na gawin ang mga ito.
Ulitin natin:
Ngayon kung estudyante ka pa pero gumagamit ka ng ganitong pananalita ay maipapayo ko na: anak mag-aral-aral din paminsan-minsan at hindi puro facebook at computer games lang ang inaatupag.
ciao!
May 09
Top of my head government, public service, shipping 80 Comments
Most internet search hits are still showing up with the Mandaluyong Post Office number which is +63 2 719 0716. This number is no longer operational. If you need to call them to validate postal notifications then the following number was provided by the PhilPost customer care: +63 2 8535 2131.
NOTE: The number is ringing and no longer responsive. The PhilPost site also removed the numbers in their web page. This is a disappointing turn of events. 🙁
[CAVEAT] I am not affiliated with the Philippines Postal Service. I am an ordinary private Filipino citizen who uses their service and publishes this blog entry as a public service.
(Paunawa: Wala akong kinalaman o koneksyon sa Postal Service ng Pilipinas. Ako ay isang ordinaryo at pribadong mamamayan ng Pilipinas na gumagamit lang din ng serbisyo ng Post Office. Itong post na ito ay isang kawanggawa lamang sa akin blog.)
[UPDATE 2016/09/19] Visitor Monica said the 535-2131 number is not working last July. I called the Mandaluyong Public Information Office and they confirmed that the post office still has that number. The number is ringing when I tried it but I didnt have the time to wait for somebody to pick it up. If the number remains non-functional then please try calling the main office using the numbers posted at https://www.phlpost.gov.ph/
Apr 21
Top of my head haiku, musings No Comments
It will pass away
The feeling of uselessness
My reality.
Apr 07
Top of my head haiku No Comments
A fortress inside
Hiding my thoughts and desires
Self-imposed prison
Feb 17
Top of my head opinion, shithappens No Comments
There is an implicit law and unseen forces in nature that increases the intensity of the urgency to take a crap as the distance decreases between your vehicle/position and your home or the nearest toilet.
Ever heard of the male trick of thinking about other things to delay “satisfaction”?It doesn’t work against the law of diminishing distance.
Jan 18
Technology mongodb, nosql, Tech No Comments
I got hit by this newbie bug. The exercise entails getting a specific record from the database, storing it in a variable, updating it a few times and saving it in the database after each update. Sounds simple, until I am perplexed that I cannot view the variable more than once. The second invocation is just showing or returning an empty string.
> var myobject = db.products.find({_id : ObjectId("507d95d5719dbef170f15c00")})
> myobject
{ "_id" : ObjectId("507d95d5719dbef170f15c00"), "name" : "Phone Service Family Plan", "type" : "service", "monthly_price" : 90, "limits" : { "voice" : { "units" : "minutes", "n" : 1200, "over_rate" : 0.05 }, "data" : { "n" : "unlimited", "over_rate" : 0 }, "sms" : { "n" : "unlimited", "over_rate" : 0 } }, "sales_tax" : true, "term_years" : 2 }
> myobject
>
> //why cant i display the object contents again?
>
It turned out that I should have used db.products.findOne instead. The findOne function returns an actual document record while the find function returns a cursor. Yes, the cursor moved the pointer on the next record after each read request which means that subsequent read calls to it are getting nothing since the cursor was already pointing to the “end of cursor” location after the first read, if I correlate that correctly with how cursors in relational databases work.
Great to know. I want my 15 minutes back. 🙂
ciao!
Nov 21
Garbage gadget, guide, online, shipping, shopping No Comments
Online shopping and buying credits presents one of the most alluring temptation combo known to the modern man. There are a few local online shops that have established their own brand but nothing beats the variety of what is available in the US market. Unfortunately not all of the US shops deliver directly to the Philippines, and some who do are expected to either leave a scorching mark on one’s wallet or are in danger of not arriving in your doorstep if its valuable enough to catch the fancy of those in the courier/custom/postal service.
Here comes to the rescue a variety of maildrop services in the US. Their services basically provides you with a US address or PO box, and then handle shipping it to the Philippines at a nominal cost. Searching for them is easy enough but I will detail something that I have used in the past, mostly because of their affordable price and convenient arrangement for somebody who doesn’t always have somebody left in the house to receive packages: Johnny Air Cargo.