Skip to content

Instantly share code, notes, and snippets.

View vicenterusso's full-sized avatar
🛠️
Mastering the art of DevOps

Vicente Russo vicenterusso

🛠️
Mastering the art of DevOps
View GitHub Profile
This file has been truncated, but you can view the full file.
+-------+-------------------------+------------+------+------------------------------------------------------------------------------------------------------------+------+
|id |time |request_time|method|request |status|
+-------+-------------------------+------------+------+------------------------------------------------------------------------------------------------------------+------+
|1375611|2023-03-21 04:47:53+00:00|3.252 |POST |POST /v1/pedidos/create-array HTTP/1.1 |201 |
|1378387|2023-03-21 05:07:27+00:00|2.142 |POST |POST /v1/pedidos/create-array HTTP/1.1 |201 |
|1379081|2023-03-21 05:12:11+00:00|2.052 |POST |POST /v1/pedidos/create-array HTTP/1.1 |

USER

You are a professional note taker with background experience as a professional book writer and editor. Because of this, all of the notes you take have exceptional grammar and spelling and are very high quality.

I will provide you with text to take notes on, and you will follow the below list of requirements exactly as they are listed before providing a response, checking at every step to ensure that all requirements and suggestions within the following list are met and upheld for each line of notes that you write.

All of your output will be in a Markdown code block You will extract the most important information from the provided text, including but not limited to: Content that could appear in a quiz. Context that provides background information. Examples related to the context or information being presented.

@vicenterusso
vicenterusso / gist:645beef41115c06b6d735bf493dd7a3c
Created December 23, 2022 15:17
MySQL - DataGrip - PHPStorm Connection failed
Change the following flags in Advanced Tab:
useSSL = false
allowPublicKeyRetrieval = true
@vicenterusso
vicenterusso / log-analyzer-command-utils.md
Created October 27, 2022 14:03
Nginx Log Analizer - Colorizer - Grep, Awk, Cut, Sort, Uniq, Ccze

To be honest, I use grep, awk, cut, sort, uniq and 'ccze -a' to colorize output from the commandline way more than anything else. It's worth learning them and key options - it will pay off many orders of magnitude.

A few quick commandline examples:

case insensitive match 'error' in nginx access.log and colorize output

grep -i error /var/log/nginx/access.log |ccze -A

how many 404 errors today?

Learning Plan for Test Driven Development (TDD)

These learning resources primarily focus on Test Driven Development (TDD).

  • There is an emphasis on learning using PHP, Laravel and PHPUnit.
  • All these resources are free (at the time of writing)
@vicenterusso
vicenterusso / Configurations for Laravel app on Kubernetes - Dockerfile
Created September 27, 2022 14:06 — forked from CodingMonkTech/Configurations for Laravel app on Kubernetes - Dockerfile
Deploying laravel on kubernetes cluster - Ready to use configuration Files
FROM php:7.2-fpm
COPY app /var/www/
EXPOSE 9000
@vicenterusso
vicenterusso / postgres_slow_blocked_queries.md
Created May 30, 2022 12:19
PostgreSQL: Find slow, long-running, and Blocked Queries

PostgreSQL: Find slow, long-running, and Blocked Queries

For active queries, PostgreSQL has a "statistics collector" subsystem that collates data on table, server, query, index, and connection activity. The database exposes information through a number of "pg_stat" predefined views and some lower-level statistic functions for power users.

Additionally, there are several system information functions that can extract session and system information on processes and queries that are currently ongoing.

The key tables and functions that I've found useful are:

  • pg_stat_activity: A table with one entry per server process, showing details of the running query for each.
@vicenterusso
vicenterusso / docker-osx.md
Last active May 4, 2022 14:29
Docker OSX - Pre installed Monterrey

Run the command to install

docker run -it \
    --device /dev/kvm \
    -dns=8.8.8.8 \
    -p 50922:10022 \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    -e GENERATE_UNIQUE=true \
@vicenterusso
vicenterusso / docker-compose.yml
Last active November 12, 2023 13:33
Docker Compose with fix Fedora 35/36/37 MySQL container - Leak Memory - High Usage - Error code 137
version: '3'
services:
mysqldb:
image: mysql:5.7.22
container_name: mysql_container_name
restart: always
ulimits:
nproc: 65535
nofile:
soft: 20000
@vicenterusso
vicenterusso / SingletonDefaultExportInstance.js
Created January 14, 2022 02:57 — forked from dmnsgn/SingletonDefaultExportInstance.js
ES6 singleton pattern: module default exports an instance
class SingletonDefaultExportInstance {
constructor() {
this._type = 'SingletonDefaultExportInstance';
}
singletonMethod() {
return 'singletonMethod';
}
static staticMethod() {