Skip to content

Instantly share code, notes, and snippets.

View Apolofx's full-sized avatar
💭

Nacho Apolofx

💭
View GitHub Profile
## Install ntfs-3g
```
brew tap gromgit/homebrew-fuse
brew install --cask macfuse
brew install ntfs-3g-mac
```
## Enable Security development in your mac (startup boot configuration -> utilities)
## Identify your ntfs disk
@Apolofx
Apolofx / lambda_timeouts_query.sql
Created April 5, 2025 15:26
CloudWatch Logs Insights query for Lambda duration stats
filter @type = "REPORT"
| stats
count(@type) as invocationsCount,
min(@duration) /1000 as minDuration,
avg(@duration) /1000 as avgDuration,
pct(@duration, 95) /1000 as p95Duration,
pct(@duration, 99) /1000 as p99Duration,
max(@duration) /1000 as maxDuration,
stddev(@duration) /1000 as stdDevDuration
by bin(1h) as timeFrame
@Apolofx
Apolofx / lambda_memory_usage.sql
Last active April 5, 2025 15:24
AWS Lambda Cost Optimization query
filter @type = "REPORT"
| stats
count(@type) as invocationsCount,
avg(@maxMemoryUsed) /1000 /1000 as avgMemoryUsed,
pct(@maxMemoryUsed, 95)/1000 /1000 as p95MemoryUsed,
pct(@maxMemoryUsed, 99)/1000 /1000 as p99MemoryUsed,
max(@maxMemoryUsed)/1000 /1000 as maxMemoryUsed,
stddev(@maxMemoryUsed)/1000 /1000 as stdDevMemoryUsed,
max(@memorySize)/1000 /1000 as allocatedMemory,
concat(ceil((avg(@maxMemoryUsed)/max(@memorySize))*100), "%") as percentageMemoryUsed
@Apolofx
Apolofx / index.md
Created March 28, 2023 21:25 — forked from franleplant/index.md
Delegacion de dominios de nic.ar

IMPORTANTE mi recomendacion es evitar nic.ar en lo posible ya que es tenido diversos problemas con su servicio, la renovacion es incomoda, me han disputado y quitado dominios que he tenido y pagado por años, tenes que sacar clave fiscal para crear un dominio. Si no tienen problemas teniendo un dominio que no sea .com.ar entonces usen Godaddy u otra cosa.

Dicho esto, si no te es posible escaparle al .com.ar segui leyendo.

Si te sirvio esta informacion considera aportar para apoyar mi trabajo via Bitcoin 1MBakrHeKFxks4SbhY7MdnhDEQnkDnPoJK Desde ya muchas gracias

Como delegar?

Mi recomendacion es usar un DNS hosted como Route 53 de AWS. DNS hosted significa que es un servidor de DNS, conectado a la base de datos distribuida que es DNS, hostead / administrado por otro, en este caso AWS. Hay otras alternativas solo que yo solo use Route 53. Busquen Hosted DNS en internet para ver alternativas. Route 53 es realmente muy barato, algo asi como 1 dolar por mes mas 0.2 dolares por hosted zone (domi

@Apolofx
Apolofx / 00_README.md
Created October 13, 2021 17:57 — forked from LeZuse/00_README.md
Install node on Apple Silicon M1 both ARM and x86 (Rosetta)

Node.js on Apple Silicon

Node Version Manager (https://github.com/nvm-sh/nvm) works perfectly across native node installations as well as emulated Rosetta installations. The trick I am using here is to install one LTS version of node under Rosetta and another stable version as native binary.

TODO

  • find a way how to run the same node version on both platforms
@Apolofx
Apolofx / javaMethods.java
Last active April 17, 2021 18:37
equals(Object o) toString() overwrite java's equals and toString methods #Java #equals #toString
public class Fecha {
private int dia = 1;
private int mes = 1;
private int año = 2006;
//El metodo equals por defecto es una Shallow comparison. Devuelve si 2 referencias a objetos refieren al mismo objeto.
public boolean equals(Object o){
boolean result=false;
// me aseguro de que no sea null y que ademas sea una instancia de Fecha, para poder hacer el downcasting de Object a Fecha
if ((o!=null) && (o instanceof Fecha)){
@Apolofx
Apolofx / algoritmos.pas
Created December 8, 2020 22:53
Algoritmos tipicos sobre estructuras de datos #listas #arboles #vectores #busqueda #ordenamiento #merge #recursion
{ ----- MODELOS -----}
program modelosPascal;
const
dimF=3;
type
rango = 1..dimF;
reg = record
@Apolofx
Apolofx / deepEquality.js
Created December 7, 2020 17:34
JavaScript Object Equality #JavaScript #objects #comparing
function deepEqual(object1, object2) {
const keys1 = Object.keys(object1);
const keys2 = Object.keys(object2);
if (keys1.length !== keys2.length) {
return false;
}
for (const key of keys1) {
const val1 = object1[key];
@Apolofx
Apolofx / Dockerfile
Created November 29, 2020 14:19
Docker image #docker #dockerfile # image
#A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. #When we tell Docker to build our image by executing the docker build command, Docker reads these instructions and executes #them one by one and creates a Docker image as a result.
FROM node:12.18.1
ENV NODE_ENV=production
WORKDIR /app
COPY ["package.json", "package-lock.json*", "./"]
RUN npm install
@Apolofx
Apolofx / path.md
Created November 12, 2020 23:55
Export PATH #path #bashrc #env

The PATH is an important concept when working on the command line. It's a list of directories that tell your operating system where to look for programs, so that you can just write script instead of /home/me/bin/script or C:\Users\Me\bin\script. But different operating systems have different ways to add a new directory to it:

Linux

  1. Open the .bashrc file in your home directory (for example,