Skip to content

Instantly share code, notes, and snippets.

@mrpeardotnet
mrpeardotnet / PVE-HP-ssacli-smart-storage-admin.md
Created Nov 25, 2019
HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)
View PVE-HP-ssacli-smart-storage-admin.md

HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

Why use HP Smart Storage Admin CLI?

You can use ssacli (smart storage administrator command line interface) tool to manage any of supported HP Smart Array Controllers in your Proxmox host without need to reboot your server to access Smart Storage Administrator in BIOS. That means no host downtime when managing your storage.

CLI is not as convenient as GUI interface provided by BIOS or desktop utilities, but still allows you to fully manage your controller, physical disks and logical drives on the fly with no Proxmox host downtime.

ssacli replaces older hpssacli, but shares the same syntax and adds support for newer servers and controllers.

Installation

@spinitron
spinitron / shoutcast-stream-title.php
Last active Apr 6, 2021
Extract and display StreamTitle from a media stream using the Shoutcast Metadata Protocol.
View shoutcast-stream-title.php
<?php
/*
* Extract and display StreamTitle from a media stream using the Shoutcast Metadata Protocol.
* Thank you, Scott McIntyre! http://www.smackfu.com/stuff/programming/shoutcast.html
*
* Copyright 2019 by Tom Worster
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
*
@fevangelou
fevangelou / my.cnf
Last active Jul 23, 2021
Optimized my.cnf configuration for MySQL/MariaSQL (on Ubuntu, CentOS etc. servers)
View my.cnf
# === Optimized my.cnf configuration for MySQL/MariaSQL (on Ubuntu, CentOS etc. servers) ===
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated February 2021 ~
#
#
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@georgy7
georgy7 / extract_mbox_attachments.py
Last active Jul 12, 2021
Extract attachments from mbox file.
View extract_mbox_attachments.py
# Modified.
# Original script source:
# http://blog.marcbelmont.com/2012/10/script-to-extract-email-attachments.html
# Usage:
# Run the script from a folder with file "all.mbox"
# Attachments will be extracted into subfolder "attachments"
# with prefix "n " where "n" is an order of attachment in mbox file.
# ---------------
@fracasula
fracasula / getMp3StreamTitle.php
Last active Jun 1, 2021
How to get the MP3 metadata (StreamTitle) from a streaming URL
View getMp3StreamTitle.php
<?php
/**
* Please be aware. This gist requires at least PHP 5.4 to run correctly.
* Otherwise consider downgrading the $opts array code to the classic "array" syntax.
*/
function getMp3StreamTitle($streamingUrl, $interval, $offset = 0, $headers = true)
{
$needle = 'StreamTitle=';
$ua = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36';