Skip to content

Instantly share code, notes, and snippets.

View whydesign's full-sized avatar
🖤
my cd ../cli and const drug = c14h19no2

Ludwig Jäschke whydesign

🖤
my cd ../cli and const drug = c14h19no2
View GitHub Profile
@whydesign
whydesign / backup.sh
Created October 16, 2024 11:33
Shell backup tool for ftp files and sql dumps
#!/bin/bash
# INFO: First, make the shell script executable with: chmod u+x backup.sh
# START: [INIT SCRIPT VARIABLES]
backupMode=1
verbose=0
# END: [INIT SCRIPT VARIABLES]
@whydesign
whydesign / MakeLangFile.php
Created June 13, 2024 12:57
Laravel custom command to generate translation file
<?php
/**
* Created by whydesign.
* Autor: Ludwig Jäschke
* Git: https://github.com/whydesign
* Date: 12.06.24
* Time: 15:45
*/
declare(strict_types=1);
@whydesign
whydesign / XmlParser.php
Created May 3, 2024 10:40
XML Parser to convert multidimensional XML into array in Symfony
<?php
declare(strict_types=1);
namespace App\Bundle\Helper;
use Symfony\Component\Serializer\Encoder\XmlEncoder;
class XmlParser
{
private $xmlString;
@whydesign
whydesign / ImageOptimizer.php
Last active May 3, 2024 10:28
GD Image Optimizer - helper class
<?php
declare(strict_types=1);
use Imagine\Gd\Imagine;
use Imagine\Image\Box;
class ImageOptimizer
{
private const MAX_SIZE = 700;
private $imagine;
@whydesign
whydesign / rpilocater_ntfy.php
Created August 11, 2023 13:40
Send RPI Locater Alerts to NTFY.sh Topic
<?php
/////////////////////////////
//* Your NTFY.sh Settings *//
/////////////////////////////
$ntfy_server = 'https://ntfy.sh/';
$ntfy_topic = 'YourRpiLocator';
$ntfy_priority = '3';
$ntfy_emoji = 'white_check_mark';
$ntfy_title = 'RPI Locator: Stock Alert!';
//////////////////////////////////////