This file contains hidden or 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
#!/bin/bash | |
echo "🚿 Starting CleanMyMac Lite (Safe Version)" | |
confirm() { | |
read -p "$1 [y/N]: " response | |
[[ "$response" == "y" || "$response" == "Y" ]] | |
} | |
safe_rm() { |
This file contains hidden or 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
""" ------------------------------------------ | |
""" The Essential IdeaVim Remaps | |
""" https://towardsdatascience.com/the-essential-ideavim-remaps-291d4cd3971b | |
""" ------------------------------------------ | |
""" Editing and Reloading the Config | |
set clipboard+=unnamed | |
set clipboard+=ideaput | |
nnoremap \e :e ~/.ideavimrc<CR> | |
nnoremap \r :action IdeaVim.ReloadVimRc.reload<CR> |
This file contains hidden or 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 PhpCsFixer\Config; | |
use PhpCsFixer\Finder; | |
$rules = [ | |
'array_indentation' => true, | |
'array_syntax' => ['syntax' => 'short'], | |
'binary_operator_spaces' => [ | |
'default' => 'single_space', |
This file contains hidden or 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
#!/bin/bash | |
# Thanks goes to @pete-otaqui for the initial gist: | |
# https://gist.github.com/pete-otaqui/4188238 | |
# | |
# Original version modified by Marek Suscak | |
# | |
# works with a file called VERSION in the current directory, | |
# the contents of which should be a semantic version number | |
# such as "1.2.3" or even "1.2.3-beta+001.ab" |
This file contains hidden or 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\Models\PointTransaction; | |
$maxAtOneTime = 30; | |
$transactionCount = 38490; | |
$pages = ceil($transactionCount / $maxAtOneTime); | |
$transactions = collect(); | |
for ($i = 1; $i < $pages + 1; $i++) { |
This file contains hidden or 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 | |
$categoryCharactors = [ | |
1 => ['ก', 'ด', 'ถ', 'ท', 'ภ'], | |
2 => ['ข', 'บ', 'ป', 'ง', 'ช'], | |
3 => ['ต', 'ฒ', 'ฆ'], | |
4 => ['ค', 'ธ', 'ร', 'ญ', 'ษ'], | |
5 => ['ฉ', 'ณ', 'ฌ', 'น', 'ม', 'ห', 'ฮ', 'ฎ', 'ฬ'], | |
6 => ['จ', 'ล', 'ว', 'อ'], | |
7 => ['ศ', 'ส'], |
This file contains hidden or 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 | |
$startTime = microtime(true); | |
function generateRange(int $range = 1, int $length = 10) | |
{ | |
for ($i = 0; $i < $range; $i++) { | |
yield generateCode($length); | |
} | |
} |
This file contains hidden or 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
#!/usr/bin/env python | |
from __future__ import print_function | |
import sys | |
import os | |
import re | |
regex = re.compile(r"^[A-Za-z]+-[0-9]+") | |
regex_formatted = re.compile(r"^[\[][A-Za-z]+-[0-9]+[\]][:]") | |
def main(): |
This file contains hidden or 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
[ | |
{ | |
"name": "Afghanistan", | |
"calling_code": "+93", | |
"code": "AFG", | |
"native_common": "افغانستان" | |
}, | |
{ | |
"name": "Albania", | |
"calling_code": "+355", |
This file contains hidden or 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 | |
namespace App\Http\Controllers\Traits; | |
use Illuminate\Foundation\Auth\ThrottlesLogins; | |
use Illuminate\Http\Request; | |
use Illuminate\Support\Facades\Auth; | |
use Illuminate\Validation\ValidationException; | |
trait AuthenticatesUsers |
NewerOlder