Skip to content

Instantly share code, notes, and snippets.

@vgrovestine
vgrovestine / mp3tag_filename_patterns.md
Last active March 10, 2024 19:36
mp3tag filename patterns

MP3Tag Filename Patterns

Individual Tracks:

$trim(%artist%) - $trim(%title%)

Albums Tracks:

%discnumber%$ifgreater(%track%,9,,0)%track% - $trim(%artist%) - $trim(%title%)
<!DOCTYPE html>
<html>
<head>
<title>PSU METEO 410: METAR Highlighter</title>
<style>
body,
input {
font-family: sans-serif;
@vgrovestine
vgrovestine / psu_meteo_ewall_archive.php
Last active August 25, 2023 22:50
Simple retrieval front-end to browse the archive of PennState Meteorology department's "e-Wall" progs.
<!DOCTYPE html>
<html>
<head>
<title>PSU Meteorology E-Wall Archive Browser</title>
<style>
body,
input,
select {
font-family: sans-serif;
@vgrovestine
vgrovestine / filesystem_browser.php
Last active July 25, 2023 14:05
Simple utility to browse the contents of a filesystem provided a starting path: Handy as a workaround for (Apache HTTPd) "Options -Indexes" directives and "mod_rewrite" shenanigans.
<!DOCTYPE html>
<html>
<head>
<title>Filesystem Browser</title>
<style>
body, input {
font-family: monospace;
font-size: 16px;
}
body {
@vgrovestine
vgrovestine / frequencies-csv2xml.php
Created March 15, 2022 14:38
Convert a spreadsheet to XML file compatible with SDRSharp's built-in frequency manager
<?php
ini_set('auto_detect_line_endings', true);
$xml = array();
$f_csv = fopen($argv[1], 'r');
$header_csv2xml = array(
'Group' => 'GroupName',
'Name' => 'Name',
'Frequency' => 'Frequency',
'Modulation' => 'DetectorType',
'Bandwidth' => 'FilterBandwidth',
@vgrovestine
vgrovestine / meteo-psu-e-education-printer-friendly.css
Last active February 6, 2022 16:43
Printer-friendly stylesheet to override the default @print styling of https://www.e-education.psu.edu/meteo*/print/*, thus providing an improved, cleaner and more legible hard-copy experience..
@import url('https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400;0,700;1,400;1,700&family=Tinos:ital,wght@0,400;0,700;1,400;1,700&display=swap');
body {
background-color: #fff;
color: #000;
}
body,
body * {
font-family: Tinos, "Liberation Serif", serif;
@vgrovestine
vgrovestine / file_get_contents_curl.php
Created October 6, 2021 17:47
Alternative to file_get_contents() which uses curl to get around remote SSL certificate snags
function file_get_contents_curl($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
// curl_setopt($ch, CURLOPT_REFERER, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
@vgrovestine
vgrovestine / chatwith.php
Created August 26, 2021 14:41
Simple utility to chat directly with a person via Microsoft Teams given their email address, without need to manually search for that particular individual in the application.
<?php
// Usage:
// https://mysite.xyz/chatwith.php?person=ME@MYSITE.XYZ
//
// Logging:
// Saved as ../chatwith_log/YYYY-MM.csv
// Write permissions required for web server.
//
// Reference:
// https://www.msoutlook.info/question/teams-chat-link-in-email-signature
@vgrovestine
vgrovestine / email-legibility-mod.Contao-form.php
Last active November 22, 2019 18:44
Raw form data, email legibility improvement (Contao 4.4)
/*
In `CONTAO_INSTALL/vendor/contao/core-bundle/src/Resources/contao/forms/Form.php` at line 342, modify `$message` variable assignment.
Default presentation of raw form data in email message body is:
Label 1: Answer 1
Label 2: Answer 2
Label 3: Answer 3
@vgrovestine
vgrovestine / tinyblockchain-cli.php
Last active January 9, 2018 00:39
Dirt simple blockchain implemented in PHP
<?php
class Block {
private $ts;
private $nonce = 0;
private $data;
private $prev_hash;
protected $hash;
private $hash_algorithm;
private $hash_prefix;