Skip to content

Instantly share code, notes, and snippets.

View nathanael79's full-sized avatar
🎯
Focusing

Nathanael nathanael79

🎯
Focusing
View GitHub Profile
@nathanael79
nathanael79 / DBCreate.php
Created July 5, 2021 05:44
Artisan Command for Creating MySQL Database
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Exception;
//inspired from https://www.techspeak.dev/2018/09/30/laravel-creating-the-database-using-artisan-commands.html
class DBCreate extends Command
@nathanael79
nathanael79 / ConnectorController.php
Created August 2, 2020 18:40
Laravel Spotify Connector Example
echo "hai sayang";
<?php
namespace App\Http\Repository;
use Illuminate\Database\Eloquent\Model;
class BaseRepository
{
@nathanael79
nathanael79 / JapaneseRegex.js
Created April 30, 2020 10:08 — forked from ryanmcgrath/JapaneseRegex.js
Regex to test for presence of Japanese characters
// REFERENCE UNICODE TABLES:
// http://www.rikai.com/library/kanjitables/kanji_codes.unicode.shtml
// http://www.tamasoft.co.jp/en/general-info/unicode.html
//
// TEST EDITOR:
// http://www.gethifi.com/tools/regex
//
// UNICODE RANGE : DESCRIPTION
//
// 3000-303F : punctuation
@nathanael79
nathanael79 / regex-japanese.txt
Created November 11, 2019 09:53 — forked from terrancesnyder/regex-japanese.txt
Regex for Japanese
Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna!
([δΈ€-ιΎ―])
Regex for matching Hirgana or Katakana
([ぁ-γ‚“γ‚‘-ン])
Regex for matching Non-Hirgana or Non-Katakana
([^ぁ-γ‚“γ‚‘-ン])
Regex for matching Hirgana or Katakana or basic punctuation (、。’)