Search This Blog

Powered by Blogger.

Pages

Browsing "Older Posts"

Snap Circuits Alternative Energy Green, from Amazon

By TY → Monday, October 12, 2015

I have previously given "Snap Circuits Jr. SC-100 Electronics Discovery Kit" as presents and it was very well received.

So this time round, I thought that the kids can have and extension to their base "Snap Circuits Jr. SC-100 Electronics Discovery Kit" and learn about alternative energy.

The original set shipped in free from Amazon without any issues. However, for the Snap Circuit Alternative Energy set,  I was not able to select the free international shipping, even though this product appear when I have selected "International Shipping" and "Free International Shipping".

So I contacted Amazon's customer service for support, the customer service explained that there is a limit to the size of the package for free international shipping which "Snap Circuit Alternative Energy" set exceeds.

Then I asked politely, if there is anything that the customer service can do to help me with this. And the customer service graciously offered to waive the shipping for me! Woo Hoo!
Thank you Amazon.

Moving Docker's Directory

By TY → Sunday, October 11, 2015


We have an AWS instance that is running docker images. The AWS instance came with 8 GB of free space and we have mounted another data partition of 100 GB.

However, by default, the docker images are consuming space from within the 8 GB, which will not be sufficient, so we have got to move docker directory to the data partition that was mounted. The following steps worked for me.

  1. Default directory /var/lib/docker
  2. Stop docker service and move docker to data partition (in this case is "/data", you can mount your data partition anywhere, just replace "/data" with what you have)
    $ sudo stop docker
    $ sudo mv /var/lib/docker /data/docker
    
  3. Edit docker config, look for DOCKER_OPTS, add "-g /data/docker". Docker config can be found at /etc/default/docker.

    Final DOCKER_OPTS should be similar to the following:
    $ cat /etc/default/docker
    # Use DOCKER_OPTS to modify the daemon startup options.
    DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4 -g /data/docker"
    
  4. Start docker service.

JDK8 java.lang.NoClassDefFoundError: com/sun/tools/javac/code/TypeTags

By TY →

Java build fail after update to jdk8 java.lang.NoClassDefFoundError: com/sun/tools/javac/code/TypeTags

Some projects continue to build successfully while some others failed after upgrading JDK.
Looking deeper into it and comparing the projects, those that failed are projects that are using lombok. It has been a while since I have upgraded lombok version. (which was still at 0.XXX)

After downloading the latest version of lombok and rebuild, the build completes successfully!

How to show sent mail in Thunderbird threaded conversation

By TY →
To see our sent mail in threaded conversation view in Thunderbird, we have to first enable unified view for folders.

After the unified inbox appear, right click on it and select "properties"
Click "Choose" to select the sent folder from the mail accounts that you want to have the sent mail appear in threaded view.

Reference:
http://superuser.com/questions/67488/can-mozilla-thunderbird-show-sent-replies-in-threaded-view

Gmail to allow less secure app to connect

By TY →


Some of my old java application that used to be able to send out email via Gmail fails. This seems to be due to a security enhancement sometime back in Gmail.

We now need to explicitly allow less secure applications to connect to Gmail. In order to do that, we will have to


  1. Go to
    https://www.google.com/settings/security/lesssecureapps
  2. Check "Allow access for less secure apps"
Note that, this feature is not available for google account with 2-steps verifications enabled.

For more information:
https://support.google.com/accounts/answer/6010255?hl=en

Unable to build in intellij idea when using lombok

By TY →
When using lombok with intellij, there is a great lombok plugin that enable Intellij to pick up the getter setter methods within the editor. However, when trying to build within Intellij, the build will fail.

To solve this, we only need to configure Intellij to process the annotations.
Go to Settings and type in "Enable annotation processing" in the search field and click "Annotation Processors" in the result.


Then just check "Enable annotation processing"

Reference : 
http://stackoverflow.com/questions/9424364/cant-compile-project-when-im-using-lombok-under-intellij-idea

Mac OS profile not loading in terminal

By TY →


This issue happened for me after installing google cloud engine for kubernetes.
After some search, This have helped me resolved it. The profile was not loaded in the terminal because .bash_profile exist.


  1. Move the following into the end of your "~/.profile"
    # The next line updates PATH for the Google Cloud SDK.
    source '/opt/App/google-cloud-sdk/path.bash.inc'
    
    # The next line enables bash completion for gcloud.
    source '/opt/App/google-cloud-sdk/completion.bash.inc'
    
  2. Rename "~/.bash_profile" as "~/.bash_profile_old"

Reference :
http://stackoverflow.com/questions/11498070/bash-profile-not-loading