Thursday, June 22, 2017

Getting to know more about myself.

After today's incident, I find out more about myself. Definitely not a good habit that I found out of myself.

I realize I slowly become more and more perfectionist. I want everything to be planned properly and go through according to my planning. 

So today, I messed up a bit the plan that I made on Friday..... I feel so bad.... so bad that I feel like throw up..... so bad that I don't feel like doing anything else today.... aih....

I feel a bit emotional now....

Tuesday, June 13, 2017

Generating one image from multiple image using Imagick.

When I completed this feature in Laravel PHP frameworks last night, I got so hyped up, feeling so achieved. Then I thought, maybe I should share my excitement with someone. But then I realize, not many people understand this kind of excitedment, in the end, it is just a syok sendiri things.

So this Imagick can put many images into one image dynamically. You can set the image size (width x height), then decide which image to be the first in the code, the margin from the left and top. Once you tried one or two, you will feel it is very easy. If you need save, let say 5 images in first row and 2 images in second row, some condition checking need to be done for the minimum width of the whole image being generated. 

So first step
- check which row has more images
- use that max images count times the width of each image
- then the total had to be add with the gap size of each image. 
- After that, calculate number of rows (in this case it's 2)
- Then use the number of rows times the height of each image and add the gap of each image again.
- After setting the height and width of the main container, create new imagick object with the image that wanted to be input into the main container
- Attach it into the main container with the margin.
- Continue attach more images and in the end, just export it as a file name.

I will share some code and example in my next post. :-) 

Thursday, June 8, 2017

Few days trip to Kota Kinabalu

So I went to KK with my brothers. We wanted to go to Kundasang and island hopping.

Sorry, I got no picture in this post.

Luckily we are driving there, so going anywhere is also quite easy. But even if without car, you can pretty much travel anywhere in KK nowadays. Lots of people doing Grab and Uber, especially when there are a lot of discount or promocodes from Uber and Grab.

So we stay at nearby Jesselton Point, which is the place you get the package for island hopping (snorkeling, parasailing, zipline, jet ski, banana boat, flying fish, diving and so on). Don't straight pay for the amount displayed. Ask for discount because they usually will give discount.

Our accommodation is called The Bunk. It's cheap and located at good location. Many tourist and foreigner stays there because it is a cheap and strategic location. However, 2 nights of our stay, I got bitten by quite many bed bug. So we requested to checkout and get our refund back. So we moved to another cheap hotel nearby called Little Gaya Hotel. It's cheaper than many other hotel but it's clean and spacious, at least enough for us. Of course it is a lot more expensive than The Bunk, but I really rather pay extra than suffer.

The Bunk: RM 22 per bunk
Little Gaya Hotel: RM160 for 2 single beds, we add extra beds cost RM65. Total RM225 / 3, it will be RM75 each. 

For our island hopping, here's the price breakdown

Boat to go and back for 2 islands hopping : RM 35 
Parasailing: RM 70 each
Snorkeling equipment: RM 10 each 
Diving: RM 180 each 
Zipline: RM 68 each

Each of us take different combo.
Elder bro: Parasailing + Snorkeling. Total only RM 35+70+10 = 125
Me: Parasailing + Snorkeling + Zipline. Total only RM 35+70+10+68 = 193
Younger bro: Parasailing + Diving: Total only RM 35+70+180 = RM 285

There are 2 big shopping malls here called Suria Mall and Imago. If you have anything that you want to know more about this trip, just leave me a comment.