Skip to content

Instantly share code, notes, and snippets.

View geofmureithi-zz's full-sized avatar

Njuguna Mureithi geofmureithi-zz

View GitHub Profile
@geofmureithi-zz
geofmureithi-zz / createqrcode.php
Created April 20, 2016 16:34 — forked from ScottPhillips/createqrcode.php
Create a QR Code using PHP and Google
function createQR($url,$size ='150',$evLevel='L',$margin='0') {
$url = urlencode($url);
return '<img src="http://chart.apis.google.com/chart?chs=' . $size . 'x' . $size . '&cht=qr&chld=' . $evLevel . '|' . $margin . '&chl=' . $url . '" alt="QR code" width="' . $size . '" height="' . $size . '"/>';
}
echo createQR('http://www.wickedbrilliant.com',150);
@geofmureithi-zz
geofmureithi-zz / log.php
Created April 20, 2016 16:32 — forked from gokhanbarisaker/log.php
PHP log utility class for more descriptive logging...
<?php
//////////////////////////////////////////////////////////////////
//
// log.php
// Log
//
// Copyright 2012 Gökhan Barış Aker
//
// Licensed under the Apache License, Version 2.0 (the "License");
@geofmureithi-zz
geofmureithi-zz / require_all_helper.php
Created April 20, 2016 16:27 — forked from pwenzel/require_all_helper.php
Recursively include all PHP files
<?php
/**
* Scan the api path, recursively including all PHP files
*
* @param string $dir
* @param int $depth (optional)
*/
protected function _require_all($dir, $depth=0) {
if ($depth > $this->max_scan_depth) {