Skip to content

Instantly share code, notes, and snippets.

View hanetooth's full-sized avatar
🎯
Focusing

HEIN HTUT AUNG hanetooth

🎯
Focusing
  • Myanmar
  • 00:00 (UTC +07:00)
View GitHub Profile
@hanetooth
hanetooth / Model.php
Created April 14, 2018 08:15 — forked from danrichards/Model.php
Laravel Base Model with some simple caching mechanisms using attribute mutators.
<?php
namespace App;
use App\Utils\Data;
use App\Utils\Str;
use Cache;
use Closure;
use DateTime;
use DB;
@hanetooth
hanetooth / strong_pass_regex.txt
Created March 23, 2018 02:38
Regex pattern for strong password php
^\S*(?=\S{8,})(?=\S*[a-z])(?=\S*[A-Z])(?=\S*[\d])\S*$
From the fine folks over at Zorched.
^: anchored to beginning of string
\S*: any set of characters
(?=\S{8,}): of at least length 8
(?=\S*[a-z]): containing at least one lowercase letter
(?=\S*[A-Z]): and at least one uppercase letter
(?=\S*[\d]): and at least one number
$: anchored to the end of the string
@hanetooth
hanetooth / fontembad.css
Last active January 7, 2018 23:00
How to embed custom font with css?
@font-face {
font-family: 'unicode';
src: url(/font/unicode.ttf) format('truetype'); //link to font file
font-weight: 400;
font-style: normal;
}
body, html, p, code, *, table, td, tr, span, div, a, ul, li, input, textarea, h1, h2, h3, h4, h5, h6
{
font-family: 'unicode'; //force to html components
}
@hanetooth
hanetooth / settings.json
Last active September 9, 2017 06:30
User settings for vscode(laravel).
{
"editor.fontSize": 15,
"editor.fontFamily": "Fira Code",
"php.validate.executablePath": "/usr/bin/php7.1",
"terminal.integrated.cursorBlinking": true,
"workbench.iconTheme": "vscode-great-icons",
"workbench.colorTheme": "Boxy Monokai",
"files.associations": {
"*.blade.php": "blade"
},