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
SELECT t1.name AS lev1, t2.name as lev2, t3.name as lev3, t4.name as lev4 | |
FROM `categories` AS t1 | |
LEFT JOIN categories AS t2 ON t2.parent_id = t1.id | |
LEFT JOIN categories AS t3 ON t3.parent_id = t2.id | |
LEFT JOIN categories AS t4 ON t4.parent_id = t3.id | |
WHERE t1.id = 1; |
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
SELECT | |
mobile, | |
COUNT(mobile) | |
FROM | |
members | |
GROUP BY mobile | |
HAVING COUNT(mobile) > 1; |
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
# Command Description | |
docker ps #List containers | |
docker pull #Pull an image or a repository from a registry | |
docker push # Push an image or a repository to a registry | |
docker rename #Rename a container | |
docker system prune # prune This will remove: | |
# - all stopped containers | |
# - all volumes not used by at least one container | |
# - all networks not used by at least one container | |
# - all images without at least one container associated to them |
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
import 'zone.js/dist/zone-node'; | |
import 'reflect-metadata'; | |
import { enableProdMode } from '@angular/core'; | |
import { ngExpressEngine } from '@nguniversal/express-engine'; | |
import * as express from 'express'; | |
import { join } from 'path'; | |
import { readFileSync } from 'fs'; | |
const domino = require('domino'); | |
// Faster server renders w/ Prod mode (dev mode never needed) | |
enableProdMode(); |
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\ProductStore; | |
use App\ProductStoreMap; | |
use Illuminate\Console\Command; | |
use Maatwebsite\Excel\Facades\Excel; | |
class MapAmazonProduct 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
systemctl enable mongod.service |
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
[program:queue_worker] | |
command = php /home/forge/appname.com/artisan queue:listen --tries=2 | |
stdout_logfile = /home/forge/appname.com/worker.log | |
redirect_stderr = true | |
numprocs = 12 | |
user=forge | |
autostart=true | |
autorestart=true | |
process_name = %(program_name)s%(process_num)s |
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
'stream' => [ | |
'ssl' => [ | |
'allow_self_signed' => true, | |
'verify_peer' => false, | |
'verify_peer_name' => false, | |
], | |
], |
NewerOlder