Skip to content

Instantly share code, notes, and snippets.

@yoga-
yoga- / UIDevice+serialNumber.h
Created September 20, 2016 07:53 — forked from 0xced/UIDevice+serialNumber.h
UIDevice+serialNumber
/*
* Adds the serialNumber property to the UIDevice class
*
* The implementation uses undocumented (for iOS) IOKit functions,
* so handle with caution and be prepared for nil.
*/
#import <UIKit/UIDevice.h>
@interface UIDevice (serialNumber)
@yoga-
yoga- / randomPassword.php
Last active September 15, 2023 19:37
PHP random password generator - contains at least one lower case letter, one upper case letter, one number and one special character,
//generates a random password of length minimum 8
//contains at least one lower case letter, one upper case letter,
// one number and one special character,
//not including ambiguous characters like iIl|1 0oO
function randomPassword($len = 8) {
//enforce min length 8
if($len < 8)
$len = 8;