Skip to content

Instantly share code, notes, and snippets.

<?php
return [
'areas_full' => [
'JP-01' => ['Code' => 'JP-01', 'Name' => 'Hokkaido', 'Japanese' => '北海道', 'ShortName' => '北海道', 'Region' => '北海道'],
'JP-02' => ['Code' => 'JP-02', 'Name' => 'Aomori', 'Japanese' => '青森県', 'ShortName' => '青森', 'Region' => '東北'],
'JP-03' => ['Code' => 'JP-03', 'Name' => 'Iwate', 'Japanese' => '岩手県', 'ShortName' => '岩手', 'Region' => '東北'],
'JP-04' => ['Code' => 'JP-04', 'Name' => 'Miyagi', 'Japanese' => '宮城県', 'ShortName' => '宮城', 'Region' => '東北'],
'JP-05' => ['Code' => 'JP-05', 'Name' => 'Akita', 'Japanese' => '秋田県', 'ShortName' => '秋田', 'Region' => '東北'],
'JP-06' => ['Code' => 'JP-06', 'Name' => 'Yamagata', 'Japanese' => '山形県', 'ShortName' => '山形', 'Region' => '東北'],
'JP-07' => ['Code' => 'JP-07', 'Name' => 'Fukushima', 'Japanese' => '福島県', 'ShortName' => '福島', 'Region' => '東北'],
@ngocnb
ngocnb / tiny-url-api.php
Created September 21, 2020 02:54 — forked from MikeRogers0/tiny-url-api.php
Tiny URL API
<?php
echo file_get_contents('http://tinyurl.com/api-create.php?url='.'http://www.example.com/');
/* For example
http://tinyurl.com/api-create.php?url=http://www.fullondesign.co.uk/
Would return:
http://tinyurl.com/d4px9f
*/
?>
@ngocnb
ngocnb / Default%20%28Windows%29.sublime-keymap
Last active December 25, 2019 03:52
sublime text setting
[
{ "keys": ["f4"], "command": "import_namespace" },
{ "keys": ["f6"], "command": "expand_fqcn" },
{ "keys": ["f10"], "command": "find_use" }
]
@ngocnb
ngocnb / nil_empty_blank_present_ffdierence_in_ruby
Created May 9, 2019 03:32 — forked from pythonicrubyist/nil_empty_blank_present_ffdierence_in_ruby
Difference between nil?, empty?, blank? and present? in Ruby and Ruby on Rasils.
# nil? can be used on any Ruby object. It returns true only if the object is nil.
nil.nil? # => true
[].nil? # => false
{}.nil? # => false
"".nil? # => false
" ".nil? # => false
true.nil? # => false
# empty? can be used on some Ruby objects including Arrays, Hashes and Strings. It returns true only if the object's length is zero.
nil.empty? # NoMethodError: undefined method `empty?' for nil:NilClass