Skip to content

Instantly share code, notes, and snippets.

View macvenez's full-sized avatar

Marco Veneziano macvenez

  • Turin, Italy
  • 12:41 (UTC +02:00)
View GitHub Profile
@chetan
chetan / dumpcerts.traefik.v2.sh
Created November 9, 2023 16:24
Convert traefik acme.json to PEM files
#!/usr/bin/env bash
# Copyright (c) 2017 Brian 'redbeard' Harrington <[email protected]>
#
# dumpcerts.sh - A simple utility to explode a Traefik acme.json file into a
# directory of certificates and a private key
#
# Usage - dumpcerts.sh /etc/traefik/acme.json /etc/ssl/
#
# Dependencies -
# util-linux
@HonbraDev
HonbraDev / remove.sh
Last active January 11, 2025 06:31
Ubuntu Server 20.04 LTS Firefox kiosk
# Stop the kiosk service
sudo systemctl stop kiosk
# Remove the kiosk service from startup
sudo systemctl disable kiosk
# Remove the kiosk service
sudo rm -f /etc/systemd/system/kiosk.service
# Reload systemctl daemons
@ivuorinen
ivuorinen / traefik-truncate-log.sh
Last active May 7, 2025 08:38
Find and truncate Traefik log
#!/usr/bin/env bash
# Truncate Traefik high volume log
# CRONTAB: 0 */2 * * * /root/scripts/traefik-truncate-log.sh > /dev/null 2>&1
TRAEFIK=$(docker ps --no-trunc | grep 'traefik' | awk '{ print $1 }');
TRAEFIK_PATH="/var/lib/docker/containers/$TRAEFIK/";
/usr/bin/find "$TRAEFIK_PATH" -type f \( -name "*-json.log" \) -size +5M -exec bash -c 'echo "" > "$1"' _ {} \;
@sandeepmistry
sandeepmistry / led_callback_nRF51822_low_power.ino
Last active November 19, 2023 21:55
BLEPeripheral nRF51822 - Low Power (Interrupt) Example
// Import libraries (BLEPeripheral depends on SPI)
#include <SPI.h>
#include <BLEPeripheral.h>
// define pins (varies per shield/board)
#define BLE_REQ 10
#define BLE_RDY 2
#define BLE_RST 9
// LED pin