Skip to content

Instantly share code, notes, and snippets.

Avatar

Erlang Parasu erlangparasu

  • Earth
View GitHub Profile
View _Laravel_Queue_Supervisor_Instruction.md

Install Supervisor with sudo apt-get install supervisor in Unix or brew install supervisor in Mac OSX. Ensure it's started with sudo service supervisor restart in Unix or brew services start supervisor in Mac OSX.

In Unix in /etc/supervisord/conf.d/ create a .conf file. In this example, laravel_queue.conf (contents below). Give it execute permissions: chmod +x laravel_queue.conf.

In Mac OSX first run supervisord -c /usr/local/etc/supervisord.ini and in /usr/local/etc/supervisor.d/ create a .conf file. In this example, laravel_queue.conf (contents below). Give it execute permissions: chmod +x laravel_queue.conf.

This file points at /usr/local/bin/run_queue.sh, so create that file there. Give this execute permissions, too: chmod +x run_queue.sh.

Now update Supervisor with: sudo supervisorctl reread in Unix and with: brew services restart supervisor in MAc OSX . And start using those changes with: sudo supervisorctl update.

@erlangparasu
erlangparasu / setphp
Last active Mar 5, 2021
set php version ubuntu
View setphp
/usr/bin/php
/usr/bin/php-cgi
/usr/bin/php-config
/usr/bin/phpdbg
/usr/bin/phpize
@erlangparasu
erlangparasu / .php_cs.laravel.php
Created Jan 5, 2021 — forked from laravel-shift/.php_cs.laravel.php
PHP CS Fixer - Laravel Coding Style Ruleset
View .php_cs.laravel.php
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
'operators' => ['=>' => null]
View bookmarks.txt
https://unix.stackexchange.com/questions/46235/how-does-reverse-ssh-tunneling-work/46271#46271
View laravel-default-tables.sql
-- Laravel default tables
CREATE TABLE `cache` (
`key` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
`value` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
`expiration` int(11) NOT NULL,
UNIQUE KEY `cache_key_unique` (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
CREATE TABLE `migrations` (
View php simple proxy
<?php
namespace main;
define("BACKEND_SOCKET", '<where the unix socket>');
define("BASE_URL", '<where this file located>');
function exit_500($msg) {
$msg = rtrim($msg, "\n") . "\nDebug trace:\n";
foreach(debug_backtrace() as $trace) {
View laravel-createEncrypter.php
<?php
namespace App\Providers;
// ...
class AppServiceProvider extends ServiceProvider
{
// ...
View install-php71-extensions-centos.sh
sudo yum install \
php71 \
php71-php \
php71-php-bcmath \
php71-php-brotli \
php71-php-cli \
php71-php-common \
php71-php-componere \
php71-php-dba \
php71-php-dbg \