Skip to content

Instantly share code, notes, and snippets.

View jaymcp's full-sized avatar

Jay McPartland jaymcp

View GitHub Profile
@jaymcp
jaymcp / helpers.php
Created June 30, 2017 13:11
Some String Conversion Helpers
<?php
if ( ! function_exists( 'pascal' ) ) {
/**
* Convert a string to PascalCase
*
* @param string $string the string to texturise
*
* @return string
*/
@jaymcp
jaymcp / worst-wp-form-plugin-ever.php
Created February 23, 2017 11:34
Written in October 2013, this is probably some of the worst PHP I've ever written.
<?php
$response = "";
function generate_response($type, $message) {
global $response;
if ($type === "success") $response = "<div class=\"msg-success\">{$message}</div>";
else $response = "<div class=\"msg-error\">{$message}</div>";
}
@jaymcp
jaymcp / currencies.php
Created February 1, 2017 17:10
List of World currencies
<?php
$currencies = [
'AFN' => [ 'name' => 'Afghani', 'symbol' => '؋' ],
'ALL' => [ 'name' => 'Lek', 'symbol' => 'Lek' ],
'ANG' => [ 'name' => 'Netherlands Antillian Guilder', 'symbol' => 'ƒ' ],
'ARS' => [ 'name' => 'Argentine Peso', 'symbol' => '$' ],
'AUD' => [ 'name' => 'Australian Dollar', 'symbol' => '$' ],
'AWG' => [ 'name' => 'Aruban Guilder', 'symbol' => 'ƒ' ],
'AZN' => [ 'name' => 'Azerbaijanian Manat', 'symbol' => 'ман' ],

Keybase proof

I hereby claim:

  • I am jaymcp on github.
  • I am jonmcp (https://keybase.io/jonmcp) on keybase.
  • I have a public key whose fingerprint is 4139 97B7 E2D2 BC23 74BC 3130 B2C4 190B 23B5 B82A

To claim this, I am signing this object: