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
$base: 16px; | |
$bg_positions: ( | |
mini: ( | |
w: $base, | |
h: $base, | |
x: 0, | |
y: $base | |
), | |
big: ( |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Admin Template</title> | |
<link rel="stylesheet" href="template.css"> | |
</head> | |
<body> |
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
DROP TABLE IF EXISTS `user`; | |
CREATE TABLE `user` ( | |
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, | |
`name` VARCHAR(50) NOT NULL DEFAULT '', | |
`email` VARCHAR(100) NOT NULL DEFAULT '', | |
`password` CHAR(60) NOT NULL DEFAULT '', /* Use PHP's password_hash() */ | |
`display_name` VARCHAR(191) NOT NULL DEFAULT '', | |
`url` VARCHAR(191) NOT NULL DEFAULT '', | |
`registered_at` DATETIME NULL DEFAULT NULL, |
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 show_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \(\1\)/' | |
} | |
function show_colored_prompt { | |
local WHITE="\[\e[00m\]" | |
local GRAY="\[\e[1;30m\]" | |
local LIGHTGREEN="\[\e[1;32m\]" | |
local GREEN="\[\e[0;32m\]" | |
local PURPLE="\[\e[0;35m\]" |
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 numalpha($value) { | |
if (ctype_digit((string) $value)) { | |
return strtr(base_convert($value, 10, 36), '0123456789', 'ABCDEFGHIJ'); | |
} elseif (ctype_alpha($value)) { | |
return base_convert(strtr($value, 'ABCDEFGHIJ', '0123456789'), 36, 10); | |
} | |
return false; | |
} |
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
if (google && google.maps && !google.maps.Map.prototype.getPadBounds) { | |
google.maps.Map.prototype.getPadBounds = function (top, right, bottom, left) { | |
top = (('' + top).match(/^[0-9]+$/i) ? parseInt(top) : 0); | |
right = (('' + right).match(/^[0-9]+$/i) ? parseInt(right) : 0); | |
bottom = (('' + bottom).match(/^[0-9]+$/i) ? parseInt(bottom) : 0); | |
left = (('' + left).match(/^[0-9]+$/i) ? parseInt(left) : 0); | |
var bounds = this.getBounds(); | |
var scale = Math.pow(2, this.getZoom()); | |
var proj = this.getProjection(); |
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 | |
$pref_ids = array( | |
'01' => '北海道', '02' => '青森県', '03' => '岩手県', '04' => '宮城県', '05' => '秋田県', | |
'06' => '山形県', '07' => '福島県', '08' => '茨城県', '09' => '栃木県', '10' => '群馬県', | |
'11' => '埼玉県', '12' => '千葉県', '13' => '東京都', '14' => '神奈川県', '15' => '新潟県', | |
'16' => '富山県', '17' => '石川県', '18' => '福井県', '19' => '山梨県', '20' => '長野県', | |
'21' => '岐阜県', '22' => '静岡県', '23' => '愛知県', '24' => '三重県', '25' => '滋賀県', | |
'26' => '京都府', '27' => '大阪府', '28' => '兵庫県', '29' => '奈良県', '30' => '和歌山県', | |
'31' => '鳥取県', '32' => '島根県', '33' => '岡山県', '34' => '広島県', '35' => '山口県', | |
'36' => '徳島県', '37' => '香川県', '38' => '愛媛県', '39' => '高知県', '40' => '福岡県', |
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 depot() | |
{ | |
static $container = null; | |
if (null === $container) { | |
$container = new \ArrayObject(array(), $flag); | |
} | |
$flag = \ArrayObject::ARRAY_AS_PROPS; | |
$args = func_get_args(); |
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 meta_tag() | |
{ | |
static $buffer = array(); | |
$charset = 'utf-8'; | |
$num = func_num_args(); | |
$args = func_get_args(); | |
if (2 === $num && is_string($args[0]) && is_string($args[1])) { |
NewerOlder