Release of node-phonenumber 0.3.0 Are Available Through NPM

Release 0.3.0have been available by today (21 July 2017) through NPM package or you can clone from my GitHub repository.

This update will reflect latest change, update and fixes from Google libphonenumber. Please make sure you check their repository for details update.

How To Copy From Remote File To Local Server Using PHP

PHP copy function is capable of accepting URL as the source & destination parameters. We can download any file available on the remote host through HTTP connection and copy it to local storage or another remote host.

Destination file will be overwritten if it already exist and if the destination is URL and it’s not support the write operation it will fail as well.

$source = 'http://example.com/robots.txt';
$destination = 'robots.txt';

if (copy($source, $destination)) {
    echo "Successfully copy $file to local server.";
} else {
    echo "Failed to copy $file !";
}

Upgrading CoreOS With Deis Onboard

Deis have disable the auto update facility in CoreOS by default due to specific technical reason.

To update to the latest release of CoreOS we must trigger the update manually using following command.

sudo systemctl unmask update-engine.service
sudo systemctl start update-engine.service
sudo update_engine_client -update

For those who is not familiar with CoreOS, you will notice the argument unmask of systemctl first command line. This service have been marked as masked to make it impossible to start nor enabled by the system itself. It is part of CoreOS systemd feature where it introduce granular level of service management.

A completed CoreOS update required a reboot as it will change the passive update partition to become active upon boot process. The update-engine service need to be stop and mask back to prevent the automatic update process in the future.

sudo systemctl stop update-engine.service
sudo systemctl mask update-engine.service

We can verify successful update with following command.

cat /etc/lsb-release

Howto Pull Docker Image in One Line

Currently Docker CLI tool only capable of pulling or refreshing a single image at one time, it’s quite a problematic if were in need to refresh a numbers of image. This problem can be solve by using some others tool in Linux shell.

docker images | awk '{print $1}' | grep -v REPOSITORY | xargs -L1 docker pull

Unification of The "Reactivator"

For last few year, i started to implemented the reactive programming into few of my projects with a different flavor like C#, ObjC, Swift and Java. From my experience in implementing the RP, its feel like filling the hole in your chest that already been there since the ancient beginning of the computer programming. There’s a thousand way that you can describe on the need to go reactive and why we need to embrace it.

Learning RP is a steep curve, and adoption speed is different for every language. I find that RP in Javascript(RxJS) & Java(RxJava) is easier to understand, especially if you came from Async programming background such NodeJS or Promise user in JS. But by having that, you will still lack of the basic fundamental behind this technology, because it’s more than the code itself, it have a different level of metaphor and perspective in understanding the working principle of RP. It will change you inner monster Imperative Behavior programming, everything will look awkward on the early stage on how you see the data flowing and branching, though it’s fun.

The most prominent moment in RP is while using it in C#, from there i learn a lot on the fundamental of the RP, getting in-depth view of the core implementation of it and renewing the inner spirit of reactive programming. And i can say it’s does solve a lot of my programming problem, although it’s introduce a newer set of problem. But it’s make you code clean and more readable, reduced invisible spaghetti link and easier to maintain.

The only thing that i want to see in the near future is.. I hope that community of RP programmer, libs provider and implementer started to discuss on the unification and standardization of the RP implementation such using common term/keyword and jargon on the code level such ‘Observable’, ‘Subscriber’, ‘Producer’,’Signal’ and others, despite the limitation on some reserved keyword or core library for some programming language. By narrowing this different i think i will speed up, the adoption rate of the RP from one language to another language.

For newcomer to RP it’s time to make a move, be reactive and don’t forget to sign the manifesto at reactivemanifesto.org, there’s a plenty of increasing RP resources available out there, plus a hyper-reactive community to help in your journey, good luck..

Adios, senor!