This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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("}","]") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
NewerOlder