Skip to content

Instantly share code, notes, and snippets.

View hamedmoody's full-sized avatar

Hamed Moodi hamedmoody

View GitHub Profile
<?php
/*
Description: A simple class based on a tutorial at WP.Tuts that creates an page with metaboxes.
Author: Stephen Harris
Author URI: http://www.stephenharris.info
*/
/* Copyright 2011 Stephen Harris (contact@stephenharris.info)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
<?php
/**
* Plugin Name: f(x) Settings Meta Box Example
* Plugin URI: http://shellcreeper.com/wp-settings-meta-box/
* Description: Code Example for Settings Page with Meta Box. <a target="_blank" href="http://shellcreeper.com/wp-settings-meta-box/">Check out the tutorial</a>.
* Version: 0.1.0
* Author: David Chandra Purnama
* Author URI: http://shellcreeper.com/
*
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
<?php
/*
Plugin Name: ابزارک پیشخوان اخبار ورزشی
Plugin URI:
Description: این افزونه ابزارکی در اختیار شما قرار میدهد تا با آن آخرین اخبار ورزشی را در پیشخوان خود داشته باشید
Version: 0.1
Author: حامد مودی
Author URI: http://ircodex.ir/?author=1
License: GPL2
*/
function gen_uuid() {
return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
// 32 bits for "time_low"
mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),
// 16 bits for "time_mid"
mt_rand( 0, 0xffff ),
// 16 bits for "time_hi_and_version",
// four most significant bits holds version number 4
@hamedmoody
hamedmoody / UUID.php
Created November 24, 2015 05:57 — forked from dahnielson/UUID.php
Pure PHP UUID generator
<?php
/**
* UUID class
*
* The following class generates VALID RFC 4122 COMPLIANT
* Universally Unique IDentifiers (UUID) version 3, 4 and 5.
*
* UUIDs generated validates using OSSP UUID Tool, and output
* for named-based UUIDs are exactly the same. This is a pure
* PHP implementation.