Skip to content

Instantly share code, notes, and snippets.

View HB9HIL's full-sized avatar
🌴
Hakuna Matata

Fabian Berg HB9HIL

🌴
Hakuna Matata
View GitHub Profile
@HB9HIL
HB9HIL / apcu-dump.php
Created February 1, 2026 19:57
APCu Cache Dump for Wavelog
<?php
/**
* This file helps you reading the APCu cache content for debugging purposes.
* Place this file in the webroot and access it via browser.
*
* Example:
*
* Copy this file to /var/www/html/apcu-dump.php
* Access via http://wavelog.example.org/apcu-dump.php
@HB9HIL
HB9HIL / version_api.php
Last active January 5, 2025 08:49
version_api
<?php
function version() {
// This API endpoint provides the version of Wavelog if the provide key has at least read permissions
$data = json_decode(file_get_contents('php://input'), true);
$valid = false;
if (!empty($data['key'])) {
$this->load->model('api_model');
if (substr($this->api_model->access($data['key']), 0, 1) == 'r') {
@HB9HIL
HB9HIL / xxx_adif_315.php
Last active November 29, 2024 20:49
Wavelog Migration for ADIF 3.1.4 -> 3.1.5
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
Migration to apply changes of the ADIF Standard 3.1.4 to 3.1.5
*/
class Migration_adif_315 extends CI_Migration {
@HB9HIL
HB9HIL / create po and mo for Wavelog
Created June 7, 2024 10:31
Creating po and mo Files from Wavelog
## For development you need gettext to be installed
apt update
apt install gettext
## Switch to project folder
cd /var/www/html
## Scan all files for gettext functions and take this key as mgsid in the template pot (assets/lang_src/messages.pot)
## We currently use "__()", "_ngettext()" and "_pgettext"
@HB9HIL
HB9HIL / replace_lang_loader.php
Last active June 6, 2024 13:39
Replace 'echo lang('array_key')' with 'echo __('Text')'
<?php
$directory = '/var/www/wavelog/application/views';
$logFilePath = '/var/www/wavelog/dev/log.log';
$langDirectory = '/var/www/wavelog/application/language/';
$sourceLang = 'english';
$languages = array(
'bulgarian' => 'bg_BG',
'chinese_simplified' => 'zh_CN',
'czech' => 'cs_CZ',
@HB9HIL
HB9HIL / call.txt
Last active February 6, 2024 11:20 — forked from int2001/qrg_config.php
Current QRV-State as image from Wavelog // Quick Hack
<img src="https://[url]/[path_to_php]?call=[call]"? </img>