Skip to content

Instantly share code, notes, and snippets.

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

Ciro cirotron

🏠
Working from home
View GitHub Profile
@ihciah
ihciah / README.md
Last active March 30, 2025 12:02
V2ray with cloudflare websocket

Configure v2ray with cloudflare with docker and docker-compose

  • caddy-*: http server related files
  • v2ray-*: v2ray related files
  • forword-*: files to relay requests

how to build the super mario 64 pc port

the binary will be in build/sm64.us.f3dex2e

PC Port - Before Building

  • get the sm64 US rom in z64 format, rename to baserom.us.z64 and put it in the sm64pc root folder
  • you can also use the japanese rom (except rename to .jp instead of .us) and when you run make you would pass VERSION=jp
@Paraphraser
Paraphraser / MQTT_Node-Red_Influx.md
Last active February 19, 2025 11:37
Efficient recipe for getting MQTT data into an InfluxDB database using Node-Red

Recipe: from MQTT to InfluxDB via Node-RED

  • 2024-05-16 adds case study explaining how to extract values from topic strings, and how to specify the measurement name in the message payload provided to the "influxdb out" node.
  • 2023-12-02 revise graphics to correspond with "influxdb out" node, and explain the pros and cons of InfluxDB 1.8 vs InfluxDB 2.

Introduction

Getting data produced by IoT sensors into a database is practically a mandatory step before effective visualisation (eg dashboards).

This recipe shows you how to get an MQTT payload into an InfluxDB database using three Node-RED nodes. It makes the following assumptions:

@frecuencialibre
frecuencialibre / libretime-docker.md
Last active March 23, 2020 03:00
Pasos a seguir para instalar LibreTime con docker

Hola compas, aquí va un intento continuo de documentar nuestro proceso de poner en marcha LibreTime para la Frecuencia Libre 99.1 en San Cristobal de las Casas, Chiapas. Favor de dejar sus preguntas/dudas/sugerencias un comentario aqui. ¡Ánimo!

CONFIGURAR SERVIDOR

Como colectivo de radio nuestra experiencia con las compus ha sido de prueba y mucho error. :) Perdimos mucho tiempo con compus viejas donadas que se nos descomponían cada rato, con compus asambladas de componentes porque luego no jalaban con linux, con otra de marca apple que tambien tenia pedos con el linux por su sistema particular de booteo. Al final compramos en mercadolibre por $MX3000 un servidor marca HP de 2011 que oficialmente soporta linux. Los de marca Dell también son buenos. No tiene que ser servidor, puede ser un cpu común. Vemos necesario un mínimo de 8gb de RAM y suficiente disco rígido para que quepa todo su sonoteca de música etc.

1. Instalar sistema

@frecuencialibre
frecuencialibre / pasos-servidor-frecuencia-libre.md
Last active March 23, 2020 03:01
Pasos a seguir para instalar LibreTime en una maquina virtual en un servidor linux

Hola compas, aquí va un intento continuo de documentar nuestro proceso de poner en marcha LibreTime para la Frecuencia Libre 99.1 en San Cristobal de las Casas, Chiapas. Favor de dejar sus preguntas/dudas/sugerencias un comentario aqui. ¡Ánimo!

CONFIGURAR SERVIDOR

Como colectivo de radio nuestra experiencia con las compus ha sido de prueba y mucho error. :) Perdimos mucho tiempo con compus viejas que se nos descomponían cada rato, con compus asambladas de componentes porque luego no jalaban con linux, y con otra de marca apple que tambien tenia pedos con el linux por su sistema particular de booteo. Al final estamos ahora intentando trabajar con un servidor marca dell que, aunque tambien ya tiene sus 12 años, es siquiera de una marca establecida que oficialmente soporta linux. Vemos que con 2gb de RAM jalaba todavía pero bien lento con las máquinas virtuales. Con 6gb de RAM mejoró bastante.

1. Instalar sistema operativo base.

Al servidor dell le pusimos Debian 9.5 con particionado guiado con LVM.

@keijiro
keijiro / 00_blot8.md
Last active June 4, 2022 13:05
KodeLife fragment shader sketch

gif

@ntrepid8
ntrepid8 / cron_speedtest.sh
Created June 28, 2017 02:18
Script to run speedtest-cli via cron and log the results
#!/usr/bin/env bash
LOG_PATH="/home/$(whoami)/log/speedtest.log"
if result=$(/usr/bin/speedtest --simple); then
parsed_result=$(printf "${result}\"" | sed ':a;N;$!ba;s/\n/" /g' | sed 's/: /="/g')
printf "[$(date)] ${parsed_result}\n" >> "${LOG_PATH}"
else
printf "[$(date)] error\n" >> "${LOG_PATH}"
exit 1
@adamxp12
adamxp12 / SEPxxxxxxxxxxxx.cnf.xml
Last active August 10, 2022 16:37
Cisco 79x1/7970 config file example
<device>
<deviceProtocol>SIP</deviceProtocol>
<sshUserId>cisco</sshUserId>
<sshPassword>cisco</sshPassword>
<ipAddressMode>0</ipAddressMode>
<devicePool>
<dateTimeSetting>
<dateTemplate>D/M/Ya</dateTemplate>
<timeZone>GMT Standard/Daylight Time</timeZone>
During an audit the Mikrotik RouterOS sshd (ROSSSH) has been identified to have a remote previous to authentication heap corruption in its sshd component.
Exploitation of this vulnerability will allow full access to the router device.
This analysis describes the bug and includes a way to get developer access to recent versions of Mikrotik RouterOS
using the /etc/devel-login file. This is done by forging a modified NPK file using a correct signature and logging
into the device with username ‘devel’ and the password of the administrator. This will drop into a busybox shell for
further researching the sshd vulnerability using gdb and strace tools that have been compiled for the Mikrotik busybox
platform.
#!/usr/bin/env python3
import paho.mqtt.client as mqtt
from influxdb import InfluxDBClient
TOPIC = "/sensors/#"
DB_SRV = {
"host": "#.#.#.#",
"username": "#",
"password": "#",