Skip to content

Instantly share code, notes, and snippets.

View hh-lohmann's full-sized avatar

hh.lohmann hh-lohmann

View GitHub Profile
@hh-lohmann
hh-lohmann / command_line_arguments.md
Created July 10, 2026 09:30 — forked from MangaD/command_line_arguments.md
Understanding Command-Line Arguments: Flags, Options, and Beyond

Understanding Command-Line Arguments: Flags, Options, and Beyond

CC0

Disclaimer: ChatGPT generated document.

When working with command-line programs, one of the first concepts you encounter is the idea of passing inputs directly to a program at launch. These inputs control behavior, configure execution, or provide data. While many developers casually refer to all such inputs as “flags,” the reality is more nuanced.

This article provides a clear, structured understanding of what these inputs are actually called, how they are categorized, and why the distinctions matter—especially for developers building robust CLI tools.

{
"title": "Takeout API",
"discoveryVersion": "v1",
"ownerName": "Google",
"version_module": true,
"resources": {
"exports": {
"methods": {
"get": {
"flatPath": "v2/{service}/exports/{exportId}",
@hh-lohmann
hh-lohmann / randomPassword.php
Created July 22, 2022 07:19 — forked from joshhartman/randomPassword.php
Human Readable Password Generator (Requires PHP 7.1+)
<?php
function randomPassword( $len = 8, $ucfirst = false, $spchar = false ){
/* Programmed by Christian Haensel
* christian@chftp.com
* http://www.chftp.com
*
* Exclusively published on weberdev.com.
* If you like my scripts, please let me know or link to me.
* You may copy, redistribute, change and alter my scripts as
* long as this information remains intact.
@hh-lohmann
hh-lohmann / base62.sh
Created April 11, 2021 13:45 — forked from BobbyRyterski/base62.sh
BASH base 62 encode / decode
#!/usr/bin/env bash
# https://gist.github.com/BobbyRyterski/7a511b96ece47655b17d
# based on http://stackoverflow.com/q/14471692
readonly BASE62=($(echo {0..9} {a..z} {A..Z}))
base62_encode() {
local out=
for i in $(bc <<< "obase=62; $1"); do