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.
Use Google Chrome, sans integration with Google
Lint staged files on commitHow to run linting on staged files when committing code with no dependency: no (lint-staged | husky | pre-commit) needed.
Migrate from Prettier to ESLint StylisticWhy and how to configure ESLint to replace Prettier for stylistic rules.
DOM element helperA 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
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.
My Putty settingsPutty configuration tips.
VirtualBox tutorialSetup an Ubuntu Server virtual machine on Windows using VirtualBox.
A CPAN client that works like a charmHow to use and configure properly a CPAN client.
NFS mount how toSteps required to do an NFS mount.
Git shell Windows tipsThere are a lot of goodies and tips it is worth to know when you install Git shell on Windows.
Git for dummiesLearn Git, reading this collection of pragmatic articles.
Unicode symbols collectionCollection of cool unicode symbols, ready for copy and paste!
Working with git branchesLearn how to perform basic tasks with git local and remote branches.
Using git and svn togetherThis is a quick and dirty way to version a folder using svn and git at the same time.
Use nzpassword!How to authenticate securely on Netezza.
sqlplus tipsTricks and tips about your everyday Oracle sqlplus usage.
prove imProveDInstructions to get a Perl test suite that checks everything is ok in your home dir.
Creative people using GitHubThis is a step by step set of instructions on how to use github to contribute to your favourite creative coding project (that is vvvv of course) so you can help, improve it, and maybe add features you need for your own projects.
My Vim configurationThis is a collection of vim configuration directives.
How to install DBD::OracleI am going to put here all the steps required to install DBD::Oracle CPAN module, which is not a straightforward installation. The purpose is to reduce headache and turn it into a repeatable process.
Getting started with Git shell on WindowsThis is a step by step guide to help you getting started with git on Windows.
Install Node.js without sudoThis is a straightforward Node.js installation, just copy and paste the commands in your shell prompt. Root permissions are not required!
How to use Devel::CoverQuick introduction and usage of Devel::Cover to get code coverage metrics for Perl