Skip to content

Instantly share code, notes, and snippets.

View David-Lor's full-sized avatar
🐍
entro.py

David Lorenzo David-Lor

🐍
entro.py
  • Vigo/Galiza/Spain
View GitHub Profile
@David-Lor
David-Lor / NavidromeDockerHealthcheck.md
Last active April 20, 2024 09:36
Navidrome Docker Healthcheck

This script validates Navidrome is running, by downloading a certain song and validating its MD5 checksum.

@David-Lor
David-Lor / main.go
Created June 27, 2023 08:30
GoLang custom time.Duration to parse from JSON/YAML
package main
import (
"encoding/json"
"fmt"
"time"
)
type MyDuration time.Duration
@David-Lor
David-Lor / Game.ini
Created May 5, 2021 19:36
Insurgency Sandstorm: SP bots
[/script/insurgency.inscheckpointgamemode]
bBots=True
SoloEnemies=50
FriendlyBotQuota=50
AIDifficulty=1.0
bUseVehicleInsertion=True
RespawnDPR=0.5
RespawnDelay=1
bUseRandomCounterAttackTypes=True
bCounterAttackReinforce=True
@David-Lor
David-Lor / README.md
Created April 17, 2021 13:24
Todoconsolas script tasaciones
@David-Lor
David-Lor / KillPlayerOnDemand.cs
Created January 1, 2021 18:01
GTA V - "Kill Player on Demand" script
using System.Windows.Forms;
using GTA;
using GTA.Native;
public class KillPlayerOnDemand : Script {
public KillPlayerOnDemand() {
KeyUp += OnKeyUp;
}
@David-Lor
David-Lor / ping2csv.sh
Created December 14, 2020 11:07
Ping > CSV logger
#!/bin/bash
# Usage: ./ping2csv.sh enp2s0 8.8.8.8
# (will ping 8.8.8.8 using interface enp2s0)
#
# Will store ping results on a file named "ping-enp2s0-8.8.8.8.csv" with lines as:
# 2020-01-01 10:15:30,15.234
set -x
INTERFACE="$1"
@David-Lor
David-Lor / portainer_show_node_title.js
Created April 8, 2020 15:22
(Portainer) Show node name on page title
// ==UserScript==
// @name Portainer-Show node name on page title
// @version 1
// @grant none
// ==/UserScript==
let nodeName = undefined;
function setTitle() {
const endpointName = document.getElementsByClassName("endpoint-name")[0];
@David-Lor
David-Lor / push.sh
Created December 7, 2019 13:17
Git push commit with current user & date
#!/bin/bash
set -ex
git add .
git commit -m "$(whoami) @ $(date '+%F %T')"
git push
# if user == "foolano" & time == 20/april/2020 16:20:00 ; then commit msg == "foolano @ 2020-04-20 16:20:00"
@David-Lor
David-Lor / docker-compose.yml
Created November 22, 2019 15:51
Portainer - Docker Compose
version: '3'
services:
portainer:
# https://www.portainer.io/installation/
# https://portainer.readthedocs.io/en/stable/deployment.html
container_name: portainer
image: portainer/portainer
ports:
- 9000:9000
@David-Lor
David-Lor / mqtt_sub_template.sh
Created November 22, 2019 15:30
Bash MQTT subscribe (mosquitto_sub) with callback
#!/bin/sh
mosquitto_sub -h localhost -t test -v | while read -r topic payload
do
echo "Rx @ ${topic}: ${payload}"
done