Skip to content

Instantly share code, notes, and snippets.

View dartokloning's full-sized avatar

Darto KLoning dartokloning

View GitHub Profile
@dartokloning
dartokloning / strong-passwords.php
Created November 24, 2019 16:30 — forked from compermisos/strong-passwords.php
A user friendly, strong password generator PHP function.
#!/usr/bin/php
<?PHP
// Generates a strong password of N length containing at least one lower case letter,
// one uppercase letter, one digit, and one special character. The remaining characters
// in the password are chosen at random from those four sets.
//
// The available characters in each set are user friendly - there are no ambiguous
// characters such as i, l, 1, o, 0, etc. This, coupled with the $add_dashes option,
// makes it much easier for users to manually type or speak their passwords.
//
@dartokloning
dartokloning / pdo-wrapper.php
Created May 5, 2020 17:41 — forked from eimg/pdo-wrapper.php
Simple yet secure PHP PDO database wrapper with CRUD methods...
<?php
# PDO Wrapper, supporting MySQL and Sqlite
# Usage:
# $db = new db();
#
# // table, data
# $db->create('users', array(
# 'fname' => 'john',
# 'lname' => 'doe'
# ));