Code Trips & Tips

Code Trips & Tips

Adventures in developing distributed systems in Go, Java , Python and C++

  • About
  • April 19, 2019

    Running a Bash script forever

    It is somewhat desirable to have a Bash script run forever; typical use case is for a long-running Docker container that backgrounds the service, and the startup script (e.g., invoked via the ENTRYPOINT command) needs to be kept alive (terminating the script would result in the process known-as “the container” to terminate too). I have […]

    Advertisement

  • December 24, 2018

    Uncompromising Python Formatting

    Uncompromising Python Formatting

    I wanted to give a shout out to Black, “the uncompromising Python code formatter.” It really is liberating not to have to worry about code formatting, not having to have unproductive, sterile discussions over PRs about code minutiae and yet being reassured that all your code is nicely formatted; most importantly, the quality of the […]

  • September 29, 2018

    HOW-TO Install Minikube on MacOS

    Minikube is an extremely useful tool to run a development Kubernetes single-node cluster locally, on a development machine. I use it regularly on my Linux box and, as I want to do development on my MacBook Pro too, I thought I’d use it there to. In order to do so, I have created a simple […]

  • August 2, 2018

    QNAP NAS Hybrid Backup Sync restart

    I have now had a TS-212 QNAP NAS for many years and I am really (really!) happy with it: it works exceedingly well for what I originally bought it for (a networked backup drive, essentially) but it has also so many more facilities that I really have come to depend on it for a number […]

  • June 9, 2018

    HOW-TO Move your code out of GitHub

    As everyone knows by now, Microsoft has bought Github for several $BN’s. Depending on your point of view, this can be either a catastrophe or a disaster: nothing good can possibly come out of it, apart from, possibly, having prevented Github (the corporation) going into a steady, sad decline, as they seemed unable to figure […]

  • December 10, 2017

    Beware of C++11 `auto`

    Here’s a puzzler for you: given the code below, what does the for loop print? using HandlersMap = std::map<std::string, std::function<std::string(const std::string&)>>; using MetaMap = std::map<std::string, HandlersMap>; void insert(MetaMap& meta, const std::string& key, const std::string& sub) { auto handlers = meta[key]; handlers[sub] = [=](const std::string& msg) { return “The response for ” + sub + ” […]

  • October 29, 2017

    Detection of Fast-Moving Objects (FOM) using OpenCV

    A “fast-moving object” (FOM) in the world of image detection is defined as one whose motion is faster than can be captured by a single image, and will result in a blurred “streak”. This poses some challenges when trying to detect its speed and trajectory, as well as estimating future trajectory and impact. Typical examples […]

  • October 16, 2017

    File Encryption Utility now offers file sharing

    With the 0.5.0 version just released, crytto now allows file sharing (e.g., via email) by sharing public keys: encrypt_send -o /tmp/my-secret.enc \ -p /home/marco/.ssh/my-key.pub \ ./my-secret.doc This generates an encrypted file (in the location specified with the -o option) and an equally encrypted “passphrase” which can then be sent (ideally via a separate sharing mechanism; although, as […]

  • September 8, 2017

    Gossip-based Failure Detectors – 0.8.0 released

    We have just released version 0.8.0 of our distlib C++ library that implements a number of popular distributed systems algorithms. This concludes a first iteration of the “SWIM Gossip Protocol” for failure detection: the implementation is now fully thread-safe and can scale up to many servers with minimal process overhead. The gossip_example.cpp toy server shows how a client […]

  • August 30, 2017

    File Encryption (and Decryption) Made Easy

    A new release of the Crytto library (0.4.0) has just been published, which greatly simplifies encrypting (and decrypting) files The new release adds the decrypt script which, when combined with the existing automatic retrieval of the encryption key from the keystore, makes it a breeze to decrypt files. For example, if you had encrypted your […]

←Previous Page
1 2 3 4 5 … 17
Next Page→

Website Powered by WordPress.com.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
 

Loading Comments...
 

    • Follow Following
      • Code Trips & Tips
      • Already have a WordPress.com account? Log in now.
      • Code Trips & Tips
      • Edit Site
      • Follow Following
      • Sign up
      • Log in
      • Report this content
      • View site in Reader
      • Manage subscriptions
      • Collapse this bar