Skip to content

Instantly share code, notes, and snippets.

View hh-lohmann's full-sized avatar

hh.lohmann hh-lohmann

View GitHub Profile
@BobbyRyterski
BobbyRyterski / base62.sh
Last active January 18, 2023 07:36
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
@joshhartman
joshhartman / randomPassword.php
Last active January 8, 2024 13:29
Human Readable Password Generator (Requires PHP 7.1+)
<?php
function randomPassword( $len = 10, $ucfirst = true, $spchar = true ){
/* 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.