Skip to content

Instantly share code, notes, and snippets.

View tylerhall's full-sized avatar

Tyler Hall tylerhall

View GitHub Profile
@tylerhall
tylerhall / strong-passwords.php
Created August 12, 2010 21:38
A user friendly, strong password generator PHP function.
<?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.
//
// Note: the $add_dashes option will increase the length of the password by
@tylerhall
tylerhall / Sosumi Multiple Devices Example
Created July 28, 2010 01:08
Sosumi multiple devices example.
<?PHP
require 'class.sosumi.php';
$ssm = new Sosumi('username', 'password');
// Print a list of all the devices in your MobileMe account
print_r($ssm->devices);
// $device_number is an integer (0 through ...) that corresponds
// to the device you want info about.