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\Console\Commands; | |
use App\Models\Burword; | |
use App\Models\BurWordSpeech; | |
use App\Services\WordsElasticSearch; | |
use Carbon\Carbon; | |
use Illuminate\Console\Command; |
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
hoohoo | |
hаphата | |
hаа | |
hаагдаhан | |
hаадагаа | |
hаалта | |
hаам | |
hаань | |
hаатуулааб | |
hабан |
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
const waiter = (cb, waitSeconds = 1) => new Promise(async (resolve) => { | |
setTimeout(async () => { | |
const result = await cb(); | |
resolve(result); | |
}, waitSeconds * 1000); | |
}); | |
const extractUsers = async (tabName = 'all', listClass = 'peopleList', itemClass = 'peopleListItem') => { | |
return waiter(() => document.querySelector('[class^="childWrapper"]').click()) | |
.then(() => waiter(() => document.querySelector('[class^="nameAndDecorators"]').click())) | |
.then(() => waiter(() => document.querySelector(`[aria-controls="${tabName}-tab"]`).click())) |
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 | |
RUN_DOCKER_COMPOSE="cd docker/ && docker-compose up -d" | |
if [ "$1" == "-d" ]; then | |
eval $RUN_DOCKER_COMPOSE | |
elif [ "$1" == "-msld" ]; then | |
msl "$RUN_DOCKER_COMPOSE" | |
fi | |
set -o allexport |
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\Rules\Contracts; | |
use Closure; | |
use Illuminate\Contracts\Validation\Rule; | |
interface RuleClosureContract extends Rule | |
{ |
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 | |
if (!function_exists('load_class_names_from_dir')) { | |
function load_class_names_from_dir(string $dir): array | |
{ | |
$files = scandir($dir); | |
if (!$files) { | |
return []; | |
} | |
return array_filter(array_map(function ($filename) use ($dir) { | |
$extension = '.php'; |
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 | |
START_DIR=$(pwd) | |
ssh -t acrossoffwest@localhost "cd $START_DIR; bash --login" |
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 | |
if [[ ! `which acl` ]]; then | |
if [[ `which apk` ]]; then | |
apk add acl | |
elif [[ `which apt` ]]; then | |
apt update | |
apt install -y acl | |
elif [[ `which apt-get` ]]; then | |
apt-get update |
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 | |
[ $UID -eq 0 ] || | |
{ echo "This script needs to be run with sudo -- \"sudo `basename $0`\"."; exit 1; } | |
SUDOERS_USERNAME=$1 | |
[ -z $SUDOERS_USERNAME ] && { echo "error SUDO_USER env variable is not set."; exit 1; } | |
adduser $SUDOERS_USERNAME |
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 | |
POSITIONAL=() | |
while [[ $# -gt 0 ]] | |
do | |
key="$1" | |
case $key in | |
-f|--force) | |
FORCE="TRUE" |
NewerOlder