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 | |
/** | |
* @package String Helpers | |
* @version 1.0 | |
* @author Dinh Quoc Han <[email protected]> | |
* @link https://henrydinh.com | |
* @license MIT | |
*/ | |
class Str |
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
$links = DB::table('post') | |
->select(DB::raw('YEAR(created_at) year, MONTH(created_at) month, MONTHNAME(created_at) month_name, COUNT(*) post_count')) | |
->groupBy('year') | |
->groupBy('month') | |
->orderBy('year', 'desc') | |
->orderBy('month', 'desc') | |
->get(); |
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
.fb_iframe_widget, | |
.fb_iframe_widget span, | |
.fb_iframe_widget span iframe[style], | |
.fb-comments span, | |
.fb-comments iframe { | |
width: 100% !important; | |
} |
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
<a href="tel:<phone number>" title="" class="btn-call"> | |
<span><i class="fa fa-phone"></i></span> | |
</a> |
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
.fv-content { | |
margin: 0 auto; | |
font-size: 1rem; | |
line-height: 1.6em; | |
font-family: Arial, Georgia, serif; | |
padding: 1vw 2vw 0; | |
} | |
@media (max-width: 1170px) { | |
.fv-content { |
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
<scheme name="GitHub" version="142" parent_scheme="Default"> | |
<option name="FONT_SCALE" value="1.0" /> | |
<metaInfo> | |
<property name="created">2019-01-23T16:58:34</property> | |
<property name="ide">PhpStorm</property> | |
<property name="ideVersion">2018.3.3.0.0</property> | |
<property name="modified">2019-01-23T16:58:37</property> | |
<property name="originalScheme">GitHub</property> | |
</metaInfo> | |
<option name="LINE_SPACING" value="1.8" /> |
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
PS1='\n' | |
PS1="$PS1"'\[\033[33m\]' | |
PS1="$PS1"'\w' | |
if test -z "$WINELOADERNOEXEC" | |
then | |
GIT_EXEC_PATH="$(git --exec-path 2>/dev/null)" | |
COMPLETION_PATH="${GIT_EXEC_PATH%/libexec/git-core}" | |
COMPLETION_PATH="${COMPLETION_PATH%/lib/git-core}" | |
COMPLETION_PATH="$COMPLETION_PATH/share/git/completion" |
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
const sluggify = (title) => { | |
title = title.replace(/^\s+|\s+$/g, "") | |
title = title.toLowerCase() | |
let original = title | |
let from = "àáảãạäăắằẳẵặâầấẩẫậđèéẻẽẹêềếểễệëìíỉĩịïîòóỏõọöôồốổỗộơờớởỡợùúủũụưừứửữựüûyỳýỷỹỵñç·/_,:;" | |
let to = "aaaaaaaaaaaaaaaaaadeeeeeeeeeeeeiiiiiiioooooooooooooooooouuuuuuuuuuuuuyyyyyync------" |
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
alias laralog="tail -f -n 450 storage/logs/laravel*.log | grep -i -E \"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:\" --color" | |
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" | |
alias wip="git add . && git commit -m 'wip'" | |
alias nah='git reset --hard;git clean -df' | |
alias art='php artisan' | |
alias a='php artisan' | |
alias tinker='php artisan tinker' | |
alias migarte='php artisan migrate' | |
alias mfs='php artisan migrate:fresh' |
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 | |
use App\Post; | |
$posts = Post::query() | |
->selectRaw( | |
'YEAR(`published_at`) as `year`, MONTH(`published_at`) as `month`, MONTHNAME(`published_at`) as `month_name`, COUNT(id) as `posts_count`' | |
) | |
->groupBy('year') | |
->groupBy('month') |
OlderNewer