The bad things:
-
Trackpad is imprecise and shaky.
-
Trackpad requires force to click.
-
Overheats A LOT (harmfully so) under load.
| #btrfs benchmark for daily used desktop OS |
This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.
While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.
| import os | |
| import requests | |
| import time | |
| from pprint import pprint | |
| def poll_job(s, redash_url, job): | |
| # TODO: add timeout | |
| while job['status'] not in (3,4): | |
| response = s.get('{}/api/jobs/{}'.format(redash_url, job['id'])) |
There is a trending 'microservice' library called go-kit. I've been using the go-kit library for a while now. The library provide a lot of convenience integrations that you might need in your service: with service discovery with Consul, distributed tracing with Zipkin, for example, and nice logic utilities such as round robin client side load balancing, and circuit breaking. It is also providing a way to implement communication layer, with support of RPC and REST.
| [DEFAULT] | |
| ; Operation mode | |
| ; This is a global value for all sections | |
| mode = master | |
| [server] | |
| ; Connection lifetime | |
| timeout = 3600 |
| Byobu is a suite of enhancements to tmux, as a command line | |
| tool providing live system status, dynamic window management, | |
| and some convenient keybindings: | |
| F1 * Used by X11 * | |
| Shift-F1 Display this help | |
| F2 Create a new window | |
| Shift-F2 Create a horizontal split | |
| Ctrl-F2 Create a vertical split | |
| Ctrl-Shift-F2 Create a new session |