git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
<?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. |
!!! 5 | |
html(class='no-js') | |
head | |
meta(charset='utf-8') | |
meta(http-equiv='X-UA-Compatible', content='IE=edge') | |
title | |
meta(name='description', content='') | |
meta(name='viewport', content='width=device-width, initial-scale=1') |
<?php | |
$regions = array( | |
'Africa' => DateTimeZone::AFRICA, | |
'America' => DateTimeZone::AMERICA, | |
'Antarctica' => DateTimeZone::ANTARCTICA, | |
'Aisa' => DateTimeZone::ASIA, | |
'Atlantic' => DateTimeZone::ATLANTIC, | |
'Europe' => DateTimeZone::EUROPE, | |
'Indian' => DateTimeZone::INDIAN, | |
'Pacific' => DateTimeZone::PACIFIC |
<?php | |
function bitly_shorten($url) { | |
$login = "bitly_login"; | |
$apikey = "bitly_apikey"; | |
$format = "json"; | |
$query = array("login" => $login, | |
"apiKey" => $apikey, | |
"longUrl" => urlencode($url), | |
"format" => $format); |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
<?php | |
// Usage: | |
// $master=new WebSocket("localhost",12345); | |
// $master->callback = function($self, $user, $msg){ | |
// $self->send($user->socket,$msg); | |
// }; | |
require "CommandsAppBase.class.php"; | |
require "WsRequest.class.php"; |
<?php | |
/** | |
* Settings | |
*/ | |
define('API_KEY', $_GET['apikey']); // CloudFlare API key | |
define('USERNAME', '[email protected]'); // Email address used to login into CloudFlare | |
define('IP', getCurrentIP()); // Current IP address | |
echo 'Setting IP address to "' . IP . '"...<br />'; |
// Reference | |
// http://tools.ietf.org/html/rfc6455 | |
// http://www.w3.org/TR/2011/WD-websockets-20110929/ | |
// https://github.com/einaros/ws | |
// https://github.com/Worlize/WebSocket-Node | |
// http://ja.wikipedia.org/wiki/WebSocket | |
// http://www.slideshare.net/You_Kinjoh/javascript-websocket P.68 | |
// http://d.hatena.ne.jp/gtk2k/20120203/1328274962 | |
var log = console.log.bind(console); |
function change(element, increment) { | |
var $el = $(element), | |
elValue = parseInt($el.val(), 10), | |
incAmount = increment || 1, | |
newValue = elValue + incAmount; | |
if ((newValue) > -1) { | |
$el.val(newValue); | |
} | |
} |
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width"> | |
</head> | |
<body> |