Gianluca Casati
Mathematician working in IT since 2005.
❤ coding!
🎶 guitar and percussions.
This is a random topic blog about things I want to remember, most of all are technical information.
A tiny function to create HTML elements, compatible with JSX
Typing FormatJS translation keysGenerate types for FormatJS translation keys and use them to avoid typos, get autocompletion, etc.
Math use casesIs it worth to study Math? Of course, yes!
My workflowPrinciples and policies I use to organize my tasks. It also includes my own way to handle a kanban board which uses an interesting approach, the metadata.
Empty HTML pageHow to create an empty HTML page, no title, no favicon
How I implement a TypeScript type-guard on an object-like type.It happens often I need to implement a TypeScript type-guard that consumes an object-like type, but did not found clear examples in official documentation or articles. This is the solution I found.
My Bash configurationFew tips I want to remember about bash configuration
React list with Array.from()How to use Array.from() to render a list of React components, makes me think about how good is React software design.
How to connect via SSH from AWS CloudShell to EC2 instanceJust a quick list of actions and tricks to write down how to connect from AWS CloudShell to an EC2 instance
My Neovim setupNeovim is my favourite editor for modern web development with React, TypeScript, etc. Here it is my setup.
Brand your app version with Create React AppWrite your app version into the HTML. Quick and simple implementation.
How to setup Google Workspace group to send and receive emailFollow these complete instructions to create a group Google Workspace to send and receive email.
Sass SVG inline background interpolation tricksCreating a dynamic SVG inline background with Sass can bring many surprises. Let me share these tricks.
TypeScript enum alternativeDefine a list of strings that represents a set of entities, using Literal Types instead of Enum
Git author amendHow to change the author name and email in Git commit history
A Simple React/Redux structureLet me show you I use Redux with React, a set of snippets that I have polished during the last few years to achieve a simplified and flexible structure that is easy to understand also for beginners.
React input number done rightHaving an input number working correctly is not that easy, let me share my implementation.
Always use TypeScriptIf you are writing a JavaScript code base you should use TypeScript, even if you are not writing TypeScript code.
My Mac Terminal configurationMac Terminal is the Non Plus Ultra. Let me share my configuration, in particular I want to remember that font! R.I.P. Steve.
AWS Lambda npm scriptsAWS Lambda is great! But even better, there is no need to add any framework on top for management. You can use npm scripts.
Vim tips & tricksVim is awesome and can speed up your productivity, however it is hard to learn. I will write here things it is worth to remember.
Vanilla JavaScript date manipulationYou don't need moment.js! Just use few snippets of native JavaScript code to parse and manipulate dates.
Use fetch!Which is better? axios or fetch? Let me share my ( unconventional, as always :^) opinion.
Optimize Maxmind database loaded on Redshift using Analytical functionsIf you need to associate an IP address to a country or a city probably you will use MaxMind data. If you load it in a relational database you will write a SQL statement that joins your traffic data with MaxMind data, which can be really heavy. This is an attempt to optimize queries by reducing the number of MaxMind data rows.
Redshift tipsI am using Redshift since two years ago, and as every database it has its SQL dialect and its secrets. I will write here everything I discover and it is worth to be annotated.
Getting started with PostGISPostGIS is a PostgreSQL extension that adds support for geographic objects allowing location queries to be run in SQL.
Play T-Rex Chrome game onlineIf you also like Chrome, you probably also like to play with the T-Rex game but then suddenly the network arrives and the game is over...
Compute ISP with MaxmindThis is a quick and dirty Perl script to compute the ISP of a given IP, using a Maxmind CSV file
Crontab best practicesHow to edit a crontab in a mantainable way, and other tips to use it the right way. I found a lot of messy crontabs around, it would be better to mantain order.
AWS Redshift compatible PostgreSQL clientHow to install a PostgreSQL client (psql) that is compatible with AWS Redshift
S3 bucket public by defaultHow to make an Amazon S3 bucket public by default.
S3 to RedShift loaderLoad data from S3 to RedShift using Lambda, powered by apex. Our goal is: every time the AWS Elastic load balancer writes a log file, load it into RedShift.
Emoji everywhere60 seconds tutorial about how to use Emoji in your web site.
Welcome to fish-shellWhen I started using the fish-shell and entered in a nice community
Tiny npm packageGuidelines to create a Node.js module following the small package philosophy.
Windows CMD alternativeTired of MS/DOS prompt limitations? Try ConEmu.
GNU ScreenBe a cowboy console, use GNU Screen!
Server hardening tipsYou got a Linux server and you want to prevent security issues: follow these instructions.
The camel replicates!Install and use CPAN packages on an host without Internet access. On conquering hosts with a camel.
Bare git serverHow to setup a git server, structured like GitHub. No web interface.
Install WebLogic 12cHow to install WebLogic 12c development version on Linux RedHat.
The camel survives!About installing Perl in hostile environments.