Today, I want to share a really handy feature in Ubuntu, Startup Application. Startup Application allows you to run additional script or program during the operating system startup. The use case that it can help you are numerous. From mount your drives or devices, startup your development web server, or maybe more complex repetitive tasks that you need to run manually every time you sign into your Ubuntu.

I will show a use case that I personally use in my Ubuntu and this is will be very helpful if you fresh install Ubuntu in your laptop. The use case is to enable edge scrolling and two finger scrolling on your laptop's Synaptics Touchpad. To enable those two features you need to run following commands in your terminal (to open your terminal press ctrl + alt + t):

$ synclient VertEdgeScroll=1 $ synclient VertTwoFingerScroll=1

If you run those commands you can see that they work perfectly enabled your edge scrolling and two finger scrolling. But the problem is the effect of those commands will wear off every time you restart/shutdown your computer so you need to run those commands again and again. This is the time for Startup Application will help you!

Sunday, August 21, 2016

I noticed that the motivation and design principles of gRPC is no longer available in the original source. So I copied this documentation for anyone interested in it. Please enjoy.

Motivation

Google has been using a single general-purpose RPC infrastructure called Stubby to connect the large number of microservices running within and across our data centers for over a decade. Our internal systems have long embraced the microservice architecture gaining popularity today. Having a uniform, cross-platform RPC infrastructure has allowed for the rollout of fleet-wide improvements in efficiency, security, reliability and behavioral analysis critical to supporting the incredible growth seen in that period.

Stubby has many great features - however, it's not based on any standard and is too tightly coupled to our internal infrastructure to be considered suitable for public release. With the advent of SPDY, HTTP/2, and QUIC, many of these same features have appeared in public standards, together with other features that Stubby does not provide. It became clear that it was time to rework Stubby to take advantage of this standardization, and to extend its applicability to mobile, IoT, and Cloud use-cases.Principles & Requirements

Coverage & Simplicity - The stack should be available on every popular development platform and easy for someone to build for their platform of choice. It should be viable on CPU & memory limited devices.

Free & Open - Make the fundamental features free for all to use. Release all artifacts as open-source efforts with licensing that should facilitate and not impede adoption.Interoperability & Reach - The wire-protocol must be capable of surviving traversal over common internet infrastructure.General Purpose & Performant - The stack should be applicable to a broad class of use-cases while sacrificing little in performance when compared to a use-case specific stack.

Layered - Key facets of the stack must be able to evolve independently. A revision to the wire-format should not disrupt application layer bindings.

Payload Agnostic - Different services need to use different message types and encodings such as protocol buffers, JSON, XML, and Thrift; the protocol and implementations must allow for this. Similarly the need for payload compression varies by use-case and payload type: the protocol should allow for pluggable compression mechanisms.

Streaming - Storage systems rely on streaming and flow-control to express large data-sets. Other services, like voice-to-text or stock-tickers, rely on streaming to represent temporally related message sequences.

Blocking & Non-Blocking - Support both asynchronous and synchronous processing of the sequence of messages exchanged by a client and server. This is critical for scaling and handling streams on certain platforms.

Cancellation & Timeout - Operations can be expensive and long-lived - cancellation allows servers to reclaim resources when clients are well-behaved. When a causal-chain of work is tracked, cancellation can cascade. A client may indicate a timeout for a call, which allows services to tune their behavior to the needs of the client.

Lameducking - Servers must be allowed to gracefully shut-down by rejecting new requests while continuing to process in-flight ones.

Flow-Control - Computing power and network capacity are often unbalanced between client & server. Flow control allows for better buffer management as well as providing protection from DOS by an overly active peer.

Pluggable - A wire protocol is only part of a functioning API infrastructure. Large distributed systems need security, health-checking, load-balancing and failover, monitoring, tracing, logging, and so on. Implementations should provide extensions points to allow for plugging in these features and, where useful, default implementations.

Extensions as APIs - Extensions that require collaboration among services should favor using APIs rather than protocol extensions where possible. Extensions of this type could include health-checking, service introspection, load monitoring, and load-balancing assignment.

Metadata Exchange - Common cross-cutting concerns like authentication or tracing rely on the exchange of data that is not part of the declared interface of a service. Deployments rely on their ability to evolve these features at a different rate to the individual APIs exposed by services.

Standardized Status Codes - Clients typically respond to errors returned by API calls in a limited number of ways. The status code namespace should be constrained to make these error handling decisions clearer. If richer domain-specific status is needed the metadata exchange mechanism can be used to provide that.

Saturday, February 27, 2016

Today, I really surprised that I can't update any plugins in my Wordpress website. All of function were working well but still can't update any plugins. I though only this one site was broken until I opened my other site and it was broken too!!! What happened!? That was like a nightmare :((
Then, I searched for the error log in the Wordpress admin directory and there were many errors occurred. Here are some of the error messages.

I googled for those error messages and found nothing related except an old post related to deprecated function ereg() in the older version of PHP. Aha! Maybe that is the source of the problems. I remembered that I changed the PHP version of my hosting from PHP 5.6 to PHP 7 about two days ago. My hosting provider said that by upgrading the PHP version to PHP 7 would improve the performance of Wordpress up to 130% of current performance. I totally sold to that advertisement at that time and changed my PHP version immediately.

I opened my cpanel and quickly downgraded my PHP version to 5.6. Everything is working well now. I can update my plugins now. :) Lesson learned, don't too quick adopt the latest technology until it is stable enough and widely use.

Saturday, February 13, 2016

Philosophy Paper contains a reasoned defense to a claim/thesis. Its objectives is to convince a reader about something that the writer want to say. From a philosophical writing, we can see someone's level of understanding of the subject problem or material because the writer can think critically about that that.

A philosophical paper may require several kinds of tasks, including:

Argument reconstruction

Objections and replies

Application

Original argument

Thought experiments

One good example of a philosophy paper is "Computing Machinery and Intelligence" by Alan M. Turing.

Tuesday, December 1, 2015

In my spare time, I started my new hobby project. And I chose Laravel framework for this project. After a few weeks working on this project, I changed my workspace and started with a new clone from my git repository. But when I tried to run :

$ php artisan serve

the code seemed not working. I got this kind of error:

require(../bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in .../bootstrap/autoload.php on line 17