TL;DR: How you can to enable the code completion for your Visual Studio Code IDE
The code completion is one of the most worth and important features of an IDE. Since the first version of Visual Basic or Visual C++, the presence of “IntelliSense” feature improved the productivity of thousands of programmers.
Normally, to create a custom code-completion bundle for your favorite programming or scripting language is a non trivial task.
But in the case of JSON formats, that task is not so hard.
You can define whatever properties, arrays, etc. …
Apache H2 is a light weight and high performance SQL Database written in Java.
It’s (almost) 100% ANSI SQL-99 compatible and it can store the data in files or in-memory. You can embed in your Java project or using with client/server pattern.
Some months ago, I worked in a “tech debt” project where a lot of business logic was coded as SQL sentences.
The goal was significantly improve the performance and scalability.
We chosen Go as programming language for its performance and flexibility balance. …
TL;DR: How to patch a node module package after execute npm install
Sometimes you are working in a npm project and a module dependency not works properly. You can submit a issue to its CVS (normally GitHub) but you can’t wait until the authors resolve it or approve your PR.
What can we do then? Well, we can patch the package after its installation.
We use a real example: Liferay Angular portlet build process.
To build a 100% Angular Liferay portlet, we use a Liferay’s support libraries (lnbs-*).
It’s works perfectly if we build for a production environment. But, what’s happen if I want to build for pre-production environment? And for QA? …
TL;DR: How to configure your Angular project to use a backend while your are developing in local mode.
Rarely you have to develop an isolate Angular app. The normal thing is that it has access to a backend and/or consumes one or more APIs.
Then, you starts the development in your local computer and when you write your service for access to the backend or API, and access with your browser to http://localhost:4200...
Surprise! Probably you have a CORS problem… (at least)
Angular CLI provides a solution to bypass these problems: reverse proxy server.
To use the angular proxy you need to define a configuration file and pass it when invoking. …
TL;DR: Recently (June 2020) Hetzner added a cloud native load balancer with Kubernetes support. Learn how to use it.
Until a couple of months ago (June 2020) Germany Hetzner Cloud provider did not have a native cloud load balancer in its portfolio.
To achieve a “LoadBalancer” service in an Hetzner Kubernetes cluster you must to use a software solution like as MetalLB.
I wrote this previous post about how to create a Rancher Kubernetes cluster on Hetzner cloud using MetalLB.
Now we are going to see how to create a Kubernetes cluster using the new Load Balancer service already available in Hetzner. …
TL;DR: Use of NLP (spaCy and Gensim) for topic modelling of Hacker News favorites links scraped with Selenium.
I love Hacker News. With just a daily glance you can be up to date in technology, start-ups, etc. It is a link aggregator where users can upvote the links they like the most. Simple and effective.
Not long ago I checked that it had a lot of “upvoted” links (I often use it as a bookmarker) and I realized that it might be interesting to analyze the links and determine what my main interests were.
Could NLP “magic” be done with something? …
TL;DR: Use CronJob to schedule a DB daily backup
One good friend of me told me time ago…
The difference between a good developer and a bad one is that the former makes backups.
Our business requirements for the backup solution are:
It’s very pretty straightforward create a AWS S3 bucket. We create it using our main AWS account with the “Create bucket wizard”. …
When you start to develop with Go (a.k.a. Golang), one thing you realize is that the generated executable is “big”. A simple HTTP “Hello world” app has a size around 7 MB (depends on the OS and architecture).
For many cases is not a problem, but if you need to transfer it through Internet or to store it in an embedded device… it’s not good.
The Ultimate Packer for eXecutables, UPX, is an executable compressor with very fast decompression time for many of architecture-OS combinations.
The most important architectures are supported: i386, x86_64, arm64, armeb, powerpc, etc.
Regarding OSs, Windows, Linux, BSD and even DOS are supported too. …
Sometimes you need to develop software with libraries, frameworks or software not so well documented.
In much of these cases, the software involves a kind of client/server communication that uses an API REST.
If for example we haven’t a client library for our programming language, sometimes it is preferable to study the behaviour capturing and analyzing the JSON or XML exchanged by the two parts.
Just the case that concerns us today.
We first need to get the HTTP data traffic.
I like to capture the data and save it in a file, and later process it with Wireshark GUI.
This is useful if the software is running under a container, for example. …
TL;DR: Deploy a private docker registry in just 5 minutes!
The main reason is for privacy.
If your are working with private code, you need to use a private registry. Among the available options we have Docker Hub, Azure Container Registry, GitLab … and your cluster!
Other reason is the flexibility.
I prefer my own registry in my cluster because we use a lot of containers for our DevOps cycle: testing, pipelines, etc. If you use a cheap cloud provider for the storage in the cluster, you have a private registry with endless possibilities.