Skip to content

Instantly share code, notes, and snippets.

@colinleefish
colinleefish / centos-6-zabbix-agent.init
Last active September 17, 2021 10:45
Zabbix agent rpm build: spec files, sudoer files and init scripts
#!/bin/sh
#
# zabbix-agent - <summary>
#
# chkconfig: 2345 55 25
# description: Zabbix agent for DepponHQ IT Infrastructure.
#
# processname: zabbix-agentd
# config: /usr/local/zabbix-agent/etc/zabbix_agentd.conf
# pidfile: /usr/local/zabbix-agent/run/zabbix-agentd.pid
@pjosalgado
pjosalgado / jks-to-nginx-command-list
Last active August 8, 2020 14:10 — forked from ilguzin/gist:6606011
How to convert Java Key Store file to pem/key for NGINX.
1. Convert our ".jks" file to ".p12" (PKCS12 keystore format):
keytool -importkeystore -srckeystore { java-keystore.jks } -destkeystore { pkcs12-keystore.p12 } -deststoretype PKCS12
2. Extract pem (certificate) from ".p12" keystore file:
openssl pkcs12 -nokeys -in { pkcs12-keystore.p12 } -out { certificate-chain.pem }
3. Extract unencrypted key file from ".p12" keystore file:
openssl pkcs12 -nocerts -nodes -in { pkcs12-keystore.p12 } -out { unencrypted-key.key }
@BusterNeece
BusterNeece / broadcast.sh
Created May 13, 2017 03:29
FunkyWayFM: The shell script used to merge the video feed and AzuraCast-powered radio feed into a single YouTube stream.
#! /bin/bash
VBR="1500k"
FPS="30"
QUAL="veryfast"
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2"
KEY=""
VIDEO_SOURCE="/home/ubuntu/video3.mp4"
@mmyers1474
mmyers1474 / script-template.sh
Last active March 22, 2020 09:33
Robust Shell Script Template
#!/bin/bash
#===============================================================================
# HEADER
#==============================================================================
# IMPLEMENTATION
#% name bash_template
#% title Bash Shell Template
#% version 0.0.1
#% checksum 5926ed74eb9baf0dc74b08e2e9be26a0
#% author Matthew Myers
@waa
waa / README.md
Last active August 22, 2019 07:06
Bacula Status widget for the Smashing Dashboard

This is a widget for the Smashing dashboard. It displays quite a bit of statistics about your Bacula backup server environment.

Preview

Prerequisites

It should be opbvious, but you will need a fully functional Bacula (community or enterprise edition) installation. This widget makes use of the Bacula command line tool called bconsole to query the Director for information, then sends the data to the Smashing server via curl.

Installation

Copy the smashing-BaculaStatus.sh bash shell script to any directory you like. It may be somewhere on the smashing server, on the Bacula Director, or any machine where cron is available. Near the top of this file, edit the variables to match your system. You will need to create a bconsole-smashing.conf file, and the information (password etc) in this file will need to match a console section in the Director's "bacula-dir

@v4lli
v4lli / fish.cpp
Created October 10, 2017 08:28
ZNC Fish Module with OpenSSL 1.1 patches (10/10/2017)
#include "znc/main.h"
#include "znc/User.h"
#include "znc/Nick.h"
#include "znc/Modules.h"
#include "znc/Chan.h"
#include "znc/IRCNetwork.h"
#include <string.h>
using std::pair;
using std::map;
@keijodputt
keijodputt / check_shoutcast_v2
Created December 7, 2017 05:52
Simple Nagios plugin to check on a SHOUTCast V2 server -- Based on 'Check SHOUTcast Server' by ChrisWi/Juliano Jeziorny
#!/bin/sh
# Nagios shoutcast plug-in
# By Juliano Jeziorny ([email protected])
# Rev 0.1
# 23/11/2010
# *********************************************************
# Modified and adapted for Shoutcast 2 to parse xml stats
# and detect unconnected source
# Rev 0.2 by Keijo D. Putt
# 07-Dec-2017
@schlingel
schlingel / AzuraCastBeispiel.asciidoc
Last active May 14, 2024 13:13
Kurze Erläuterung zur Azura API Verwendung.

Azura Beispiel Code

Alle Daten die man benötigt sind schon im Station-Response drinnen. In diesem Beispiel nehmen wir einfach die Daten daraus und wiederholen den Aufruf alle 1,5 Sekunden um aktuell zu bleiben.

Das Beispiel besteht aus zwei Dateien. Einem HTML-File namens index.html. Dieses definiert nur eine sehr grobe Grundstruktur in der die Daten dargestellt werden. Das zweite File heißt azura_beispiel.js und definiert die Logik, die die Daten abruft und darstellt.

@trustin
trustin / logid.cfg
Last active April 4, 2025 14:51
logiops settings for Logitech MX Anywhere 3 and 2 (/etc/logid.cfg)
devices: ({
name: "MX Anywhere 3";
hiresscroll: {
hires: true;
invert: false;
target: false;
up: {
mode: "Axis";
axis: "REL_WHEEL_HI_RES";
@BusterNeece
BusterNeece / video_stream.liq
Last active June 26, 2025 18:43
Liquidsoap 2.1 Video Stream with HLS
# Update:
# I am moving this script back to its original home as part of the AzuraCast repository:
# https://github.com/AzuraCast/radio-video-stream
# --
# See updated instructions there.