Skip to content

Instantly share code, notes, and snippets.

View AgustinParmisano's full-sized avatar
🏠
Working from home

Agustin Parmisano AgustinParmisano

🏠
Working from home
View GitHub Profile
@AgustinParmisano
AgustinParmisano / fcat
Created November 17, 2025 20:32
cat with fzf type filter
#!/bin/bash
show_help() {
echo "Uso: fcat <archivo>"
echo "Muestra el contenido de un archivo usando fzf para navegación interactiva"
echo ""
echo "Ejemplos:"
echo " fcat salario.txt"
echo " fcat /var/log/syslog"
}
@AgustinParmisano
AgustinParmisano / fast file-dir search .zshrc config
Last active November 16, 2025 09:03
fast file-dir search .zshrc config
# Add wisely, as too many plugins slow down shell startup.
# history and fzf plugins allows ctrl+r fzf like command search
plugins=(git history fzf)
alias cdf='cd "$(dirname "$(fd -a -t f . ~ --hidden --exclude .git 2>/dev/null | fzf --preview="bat --style=full --color=always {}" --preview-window=right)")"'
# Define la función para buscar y navegar (cd function with fzf)
function cdf_widget {
# Ejecuta fzf y fd con bat para la vista previa.
# Usamos -a para rutas absolutas y 2>/dev/null para ignorar errores de permisos
local selected_file
@AgustinParmisano
AgustinParmisano / meteoblue_alereta_lluvias_lp.py
Created May 5, 2025 20:55
Primer etapa de alertador de condiciones meteorológicas adversas para la plata con consultas a api de meteo blue
import requests
import smtplib
from datetime import datetime
import locale
locale.setlocale(locale.LC_TIME, 'es_ES.UTF-8') # Linux
# locale.setlocale(locale.LC_TIME, 'Spanish_Spain.1252') # Windows
# Configuración
API_KEY = "NOPE"
LAT = -34.920345 # Latitud de La Plata
@AgustinParmisano
AgustinParmisano / gist:ff85752c5c74eb203f9e1a9a879fc7de
Last active November 5, 2024 23:21
tp final sistemas operativos 2024 isfdyt210
#!/bin/bash
if [ $# -ne 2 ]; then
echo "Se requieren 2 parametros: {string} {directorio}"
exit 2
fi
peso=$(ls -l $2 | grep "$1" | awk -F' ' '{sum+=$5;} END{print sum;}')
cant=$(ls -l | tail -n +2 | grep -c t)
ext=$(ls -l | grep $1 | awk -F"." '{ print $2 }' | sort | uniq -c | sort | tail -1)
echo "Cantidad de archivos encontrados: $cant"
echo "Peso total de los archivos: $peso"
@AgustinParmisano
AgustinParmisano / lorenz_cohvec.py
Last active February 11, 2022 23:34
lorenz cohvec con python
from ast import literal_eval
import numpy as np
from matplotlib import pyplot as plt
data_file = open("CohVec.txt", "r")
data = data_file.read()
list_data1 = data.replace("{","[")
list_data2 = list_data1.replace("}","]")
class Alumno:
def __init__(self, nombre, apellido, dni, materias, becado = False):
self.nombre = nombre
self.apellido = apellido
self.dni = dni
self.materias = materias
self.becado = becado
def mejorCursada(self):
class Cliente():
def __init__(self, nombre, apellido):
self.nombre = nombre
self.apellido = apellido
class Producto():
def __init__(self, nombre, precio, id):
self.nombre = nombre
self.precio = precio
@AgustinParmisano
AgustinParmisano / nessus_process_checker.sh
Last active April 16, 2019 15:04
nessus process resources checker
#!/bin/bash
top -b -c -p $(pgrep -d',' -f nessusd) > top.dat &
while :
do
for i in {1..50} :
do
cat top.dat | grep nessusd | cut -c 50-53 > nessus_cpu.txt
sleep 5
data=$(awk '/./{line=$0} END{print line}' nessus_cpu.txt)
@AgustinParmisano
AgustinParmisano / mili_sensor_simulation.py
Last active December 3, 2018 18:58
sensor simulation in mili time ranges
import time
import random
import paho.mqtt.client as mqtt
# The callback for when the client receives a CONNACK response from the server.
def on_connect(client, userdata, flags, rc):
print("Connected with result code "+str(rc))
# Subscribing in on_connect() means that if we lose the connection and
# reconnect then subscriptions will be renewed.
@AgustinParmisano
AgustinParmisano / base1
Created November 25, 2018 01:09
testing sonic pi
use_debug false
use_bpm 130
fadein = (ramp *range(0 ,2, 0.01))
live_loop :kick do
if (spread 1, 4).tick then
sample :bd_tek, amp: fadein.look, cutoff: 80
end
sleep 0.25