Js,Ts,Css
How to keydown/keyup for Android browser
If you want to trigger and event of “keydown” or “keyup” using a browser coming from an Android device be aware that Android will always send the keyCode = 229 and so you are not able to use that data in the standard way Example To avoid this problem I’d Read more…
Bash
Clean files content
Useful command to clean all files content of a directory without removing it… Use cases: you have an application running and you don’t want to stop you don’t want to think about reset file permission that somebody else has configured in a bad way
Database
SQL server
Select query for production (nolock) Table lock simulation Backup Command line database backup using SqlCmd tool (localhost database) Restore Command line database restore using SqlCmd tool (localhost database) Link tablespace to filegroup Get active connection Try catch block Ram by database Ram by tables Shrink database Table count and dimensions Read more…
Bash
Git cherry pic
Sometimes you need to move your develop from a branch to another; in this case the cherry pick command is your friend. Definition: given one or more existing commits, apply the change each one introduces, recording a new commit for each. This requires your working tree to be clean (no Read more…
Server
Firewall cmd
Simple firewall management tool that uses firewalld deamon Install List all zones Rule management
Server
Certbot – SSL certificates
Certbot it’s an cool tool that automatically enable HTTPS on your website deploying Let’s Encrypt certificates. How to Centos not snap – not anymore supported Snap install See the official guide https://certbot.eff.org/lets-encrypt/centosrhel7-apache To create the certificates Your certificates are deployed (usually) under /etc/letsencrypt/live/domain.tld/ cert.pem is the certificate privkey.pem is the Read more…
Server
Setup VPS from scratch
A virtual private server (VPS) is a virtual machine sold as a service by an Internet hosting service. To start having fun you need at least: 1vCpu, 2GB RAM e 20GB SSD with 100 mbps bandwidth Then Make sure that you have a root access to the VPS Secure SSH Read more…
Bash
Backup folders
Rsync, which stands for “remote sync”, is a remote and local file synchronization tool. It uses an algorithm that minimizes the amount of data copied by only moving the portions of files that have changed. Here an example