This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
// Usage | |
$container = new Container(); | |
// Basic use | |
$container->aa = 'a'; | |
// Its No error, and added hierarchical data. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Reg | |
{ | |
private $source = null; | |
private $matched = false; | |
public function __construct($source) | |
{ | |
$this->source = $source; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* inspired Slim\Helper\Set | |
* https://github.com/slimphp/Slim/blob/2.x/Slim/Helper/Set.php | |
*/ | |
class Data implements \ArrayAccess, \Countable, \IteratorAggregate | |
{ | |
private $data = array(); | |
private $buffer = array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
# project-managerプラグインの起動 | |
{ | |
type: "button" | |
icon: "repo" | |
callback: "project-manager:toggle" | |
tooltip: "Open Project" | |
style: { | |
color: "cyan" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function meconv($value) | |
{ | |
if (ctype_digit(strval($value))) { | |
$str = chr(96 + strlen(base_convert($value, 10, 36))); | |
$str .= base_convert($value, 10, 36); | |
$str .= md5($value); | |
return substr($str, 0, 14); | |
} elseif(is_string($value)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function geohash(lat, lon, len) | |
{ | |
if (len) { | |
len = Number(len); | |
if (len < 1 || len > 12) { | |
return false; | |
} | |
} else { | |
len = 12; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function geohash($lat, $lon = NULL, $len = 12) | |
{ | |
if ($len < 1 || $len > 12) { | |
return false; | |
} | |
$base32Chars = array( | |
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'b', 'c', 'd', 'e', 'f', 'g', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 最初にこの関数を実行し、ログに出力されたURLにアクセスしてOAuth認証する | |
function twitterAuthorizeUrl() { | |
Twitter.oauth.showUrl(); | |
} | |
// OAuth認証成功後のコールバック関数 | |
function twitterAuthorizeCallback(request) { | |
return Twitter.oauth.callback(request); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function vars($keys = null, $value = null) | |
{ | |
static $values = array(), $buffer = array(); | |
if (empty($keys)) { | |
return $values; | |
} |