Skip to content

Instantly share code, notes, and snippets.

View Commifreak's full-sized avatar

Robin Kluth Commifreak

View GitHub Profile
@Commifreak
Commifreak / composer.json
Last active November 8, 2019 09:00
Zendesk Excel Export with PHP and cURL
{
"require": {
"phpoffice/phpspreadsheet": "^1.9",
"ext-curl": "*",
"ext-json": "*"
}
}
@Commifreak
Commifreak / Windows symlink.txt
Last active March 21, 2020 15:56
SRCDS / Half-Life 2 Deathmatch Dedicated Server configuration files: server.cfg with remote map download
@Commifreak
Commifreak / runedal.sh
Last active August 14, 2020 07:52
eDAL! Start-script
#!/bin/bash
## eDAL! Helper
## add to crontab like:
## eDAL
##@reboot edal /opt/runedal.sh
##
## IMPORTANT!
@Commifreak
Commifreak / lora_mkr1010.ino
Created October 14, 2020 15:32
Dragino LoRa Test on MKR 1010
#include <SPI.h>
#include <lmic.h>
#include <hal/hal.h>
int waitForSerial = 10000; //10s
unsigned long currentMillis = 0;
/**
################################################ LoRa stuff
*/
@Commifreak
Commifreak / 1_VaillantAPI.php
Last active November 16, 2020 17:31
VaillantAPI
<?php
class VaillantAPI
{
private $_ch;
private $_lastCurlError;
private $_lastCurlInfo;
private $_lastCurlErrno;
private $_proxyPort;
@Commifreak
Commifreak / addRUser.sh
Created November 25, 2020 09:26
Create a new user for rstudio free
#!/bin/bash
HTTPADDR=http://rstudio-webpage/
HELPADDR=http://helppage/
#Skeleton to use (put Renviron in there for example
SKEL=/opt/ruser-skel
MAILSENDER=rsupport@domain.tld
@Commifreak
Commifreak / getCommonlyUsedPackages.php
Created June 11, 2021 06:14
R - Show commonly used packages of users
<?php
$pkgs = [];
$libs = 'R/x86_64-pc-linux-gnu-library';
chdir('/home');
$users = glob('*.*');
@Commifreak
Commifreak / moveOldLib.sh
Created June 11, 2021 06:16
R - move old R user lib and clean any active session to force re-creation of the user lib
#!/bin/bash
RVER=$1
if [ "$RVER" == "" ]; then
echo "No R version specified"
exit 1
fi
echo "Killing sessions..."
@Commifreak
Commifreak / example.php
Last active March 21, 2022 13:58
PHP + Apache + mod_fcgi + EventSource SSE Working example
/**
Apache configured via mod_fcgi default. No special config
**/
$padSize = ini_get('output_buffering');
header("Content-Type: text/event-stream");
header("Cache-Control: no-cache");
ob_implicit_flush(true); // flush auto
@Commifreak
Commifreak / vcdsParser.php
Last active July 7, 2022 15:58
VCDS AutoScan parser for PHP
/**
* Takes a AutoScan as input and gives back an array with infos
* @param $path
* @return array The data [ECU#, PartNo, ComponentVersion]
* @note This code is part of vag-flashinfo.de ;)
*/
public static function processVCDSFile($path) {
$vcdsData = [];