Skip to content

Instantly share code, notes, and snippets.

View ssatz's full-sized avatar
🏠
Working from home

sathish ssatz

🏠
Working from home
View GitHub Profile
@ssatz
ssatz / mail.php
Created April 26, 2017 06:35
Disable SSL Certificate on Laravel Mail(Swift Transporter)
'stream' => [
'ssl' => [
'allow_self_signed' => true,
'verify_peer' => false,
'verify_peer_name' => false,
],
],
@ssatz
ssatz / queue_worker.conf
Last active April 26, 2017 13:17
Queue Worker Multiples/Parallel Jobs Using Supervisor
[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
@ssatz
ssatz / auto_start_mongodb
Created August 27, 2017 09:53
AutoStart Mongodb on Ubuntu 16 & Above
systemctl enable mongod.service
@ssatz
ssatz / MapAmazonProduct.php
Created January 12, 2018 05:35
map amazon product
<?php
namespace App\Console\Commands;
use App\ProductStore;
use App\ProductStoreMap;
use Illuminate\Console\Command;
use Maatwebsite\Excel\Facades\Excel;
class MapAmazonProduct extends Command
@ssatz
ssatz / server.ts
Last active May 13, 2019 12:02
AngularV5 + MaterializeCss(without Jquery) support for Server Side Rendering
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();
@ssatz
ssatz / docker
Last active January 7, 2019 08:10
Docker command
# 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
@ssatz
ssatz / user_mobile_duplicate.sql
Created March 4, 2018 07:17
Mariadb Duplicate Values
SELECT
mobile,
COUNT(mobile)
FROM
members
GROUP BY mobile
HAVING COUNT(mobile) > 1;
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;
@ssatz
ssatz / macos_filezilla_ftp.txt
Last active July 1, 2018 04:46
shift + command + period (.)
shift + command + period (.)
Will show hidden folers
// Nuxt.js dynamic components example
https://github.com/nuxt/nuxt.js/tree/dev/examples/dynamic-components
@ssatz
ssatz / amazon s3
Created June 30, 2018 12:21
Amazon S3 content encoding gzip error content encoding
Images are already gzip, so remove content-encoding:gzip