Skip to content

Instantly share code, notes, and snippets.


Jim Westergren JimWestergren

View GitHub Profile
JimWestergren / checkPawnedPasswords.php
Last active Dec 21, 2020
Simple method to check the Pwned Passwords API using PHP
View checkPawnedPasswords.php
* Simple method to use the API from
* Written by Jim Westergren and released to public domain
* @return int count
function checkPawnedPasswords(string $password) : int
$sha1 = strtoupper(sha1($password));
$data = file_get_contents(''.substr($sha1, 0, 5));
JimWestergren / pdo-vs-mysqli.php
Last active Oct 31, 2017
Test the speed of PDO versus MySQLi
View pdo-vs-mysqli.php
/* Script to test the speed of PDO versus MySQLi
* Written by Jim Westergren, info
* I release this code to public domain.
* Please give attribution by name and link but not required
define('MYSQL_HOST', '');
define('MYSQL_USERNAME', '');
define('MYSQL_PASSWORD', '');
define('MYSQL_DATABASE', '');

Keybase proof

I hereby claim:

  • I am JimWestergren on github.
  • I am jimwestergren ( on keybase.
  • I have a public key whose fingerprint is 9EC1 412F CF0F CC49 59F5 CC72 8332 DA72 58C7 0350

To claim this, I am signing this object:

JimWestergren / index-with-redis.php
Last active Jun 27, 2019
Redis as a Frontend Cache for WordPress
View index-with-redis.php
Author: Jim Westergren & Jeedo Aquino
File: index-with-redis.php
Updated: 2012-10-25
This is a redis caching system for wordpress.
see more here: