Skip to content

Instantly share code, notes, and snippets.


Peter Elmered pelmered

View GitHub Profile
barryvdh / lumen_ide_helper.php
Last active April 10, 2023 10:26
Lumen IDE Helper
View lumen_ide_helper.php
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel Lumen (5.1.1) (Laravel Components 5.1.*) on 2015-08-18.
* @author Barry vd. Heuvel <>
* @see
namespace {
lucasstark / gist:6594983
Created September 17, 2013 14:21
Example to add meta data to woocommerce cart items
View gist:6594983
* Plugin Name: Example Modify Price
class Example_Modify_Price {
private static $instance;
public static function register() {
if (self::$instance == null) {
Dynom / gist:5866837
Last active December 5, 2017 14:05
Creating ISO 8601-extended in PHP, using DateTime. This includes milliseconds (and if you want, microseconds). Based on the work mentioned here:
View gist:5866837
// Our input
$time = microtime(true);
// Determining the microsecond fraction
$microSeconds = sprintf("%06d", ($time - floor($time)) * 1000000);
// Creating our DT object
$tz = new DateTimeZone("Etc/UTC"); // NOT using a TZ yields the same result, and is actually quite a bit faster. This serves just as an example.
johnpbloch /
Created August 23, 2012 13:55
A bash script to make .pot files for WordPress plugins


To install, you need to have the WordPress i18n library on your computer. Check it out using SVN:

sudo svn co /usr/lib/wpi18n

You don't have to put the library in /usr/lib/wpi18n, but if you don't put it there, make sure to set the $WP_I18N_LIB environment variable in your .bashrc file (with no trailing slash):

export WP_I18N_LIB="/path/to/i18n/lib"