Skip to content

Instantly share code, notes, and snippets.

View henrygermany's full-sized avatar

Henry Germany henrygermany

  • blueALPHA GmbH
  • Kaiserslautern, Germany
View GitHub Profile
@juancsr
juancsr / mac-docker-withot-docker-destop.md
Last active April 17, 2024 15:05
Use docker in mac without docker-
@DenesKellner
DenesKellner / argumentParser.php
Last active February 21, 2023 22:03
Command line argument parser. Very convenient, you can define your switches & parameters as if you were writing the help of your program. Handles string, integer and boolean types, supports numbered arguments (not counting the switches of course), and the same function can be used for declaration and parameter querying. No dependencies.
<?php
function arg($x="",$default=null) {
static $argtext = "";
static $arginfo = [];
/* helper */ $contains = function($h,$n) {return (false!==strpos($h,$n));};
/* helper */ $valuesOf = function($s) {return explode(",",$s);};