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 Illuminate\Console\Command; | |
use Illuminate\Support\Arr; | |
use Symfony\Component\Console\Output\ConsoleSectionOutput; | |
class DbReplicate extends 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
version: '2' | |
# Run with docker-compose up -d | |
# Navigate to http://localhost:4200 | |
# See Crate's getting started docs: https://crate.io/docs/reference/hello.html | |
services: | |
crate01: | |
image: crate | |
hostname: crate01 | |
ports: | |
- "4200:4200" |
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
let res = document.createElement("script"); | |
res.src = 'https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.debug.js'; | |
document.body.appendChild(res); | |
res.onload = function () { | |
const pdf = new jsPDF(); | |
const added_images = []; | |
const added_pages = []; | |
const images = []; | |
// var loopCounter = 0; | |
let allElements = document.querySelectorAll("*"); |
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 | |
/** | |
* Created by PhpStorm. | |
* User: Hiệp Nguyễn | |
* Date: 26/07/2022 | |
* Time: 09:25 | |
* | |
* app/Models/Traits/FilterScope.php | |
* use this trait in model | |
*/ |
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 | |
/** | |
* Created by PhpStorm. | |
* User: Hiệp Nguyễn | |
* Date: 27/07/2022 | |
* Time: 15:43 | |
* | |
* we don't care about exactly total records, just pagination as page by page | |
* see https://github.com/hammerstonedev/fast-paginate | |
*/ |
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
version: "3" | |
services: | |
crdb1: | |
image: cockroachdb/cockroach:v21.2.6 | |
ports: | |
# - "26257:26257" | |
- "8889:8080" | |
command: start --certs-dir=/cockroach/certs --join crdb1,crdb2,crdb3 --accept-sql-without-tls --store=path=/cockroach/cockroach-data,size=1G --listen-addr=crdb1 |
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/sh | |
#Check the Drive Space Used by Cached Files | |
du -sh /var/cache/apt/archives | |
#Clean all the log file | |
#for logs in `find /var/log -type f`; do > $logs; done | |
logs=`find /var/log -type f` | |
for i in $logs |
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/sh | |
echo "Ho va ten:" | |
read name | |
echo "Lop:?" | |
read class | |
echo "So dien thoai:" | |
read phone_number | |
echo "Thu vien sach" |
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
version: '3' | |
services: | |
master: | |
image: chrislusf/seaweedfs:2.40_large_disk # use a remote image | |
# ports: | |
# - 9333:9333 | |
# - 19333:19333 | |
entrypoint: "/usr/bin/weed" | |
command: "master -ip=master -mdir=/data -volumePreallocate -volumeSizeLimitMB=20000" |
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
[Unit] | |
Description="seaweedfs master service" | |
[Service] | |
User=ssh_5pdf | |
WorkingDirectory=/var/www/media.123doc | |
ExecStart=/usr/bin/weed master -mdir=/var/www/media.123doc/master -volumePreallocate -volumeSizeLimitMB=128000 -ip=127.0.0.1 | |
Restart=always | |
[Install] |
NewerOlder