Skip to content

Instantly share code, notes, and snippets.

@rootlocal
rootlocal / puma.monitrc
Created February 5, 2018 09:44 — forked from sudara/puma.monitrc
Example config needed to use monit with puma, monitoring workers for mem.
# this monit config goes in /etc/monit/conf.d
check process puma_master
with pidfile /data/myapp/current/tmp/puma.pid
start program = "/etc/monit/scripts/puma start"
stop program = "/etc/monit/scripts/puma stop"
group myapp
check process puma_worker_0
with pidfile /data/myapp/current/tmp/puma_worker_0.pid
@rootlocal
rootlocal / pgsql_fts_migration.php
Created December 31, 2017 05:23 — forked from Insolita/pgsql_fts_migration.php
Полнотекстовый поиск postgres+yii2 - миграция
<?php
use yii\db\Migration;
class m170105_004305_add_fts extends Migration
{
public function safeUp()
{
/*
@rootlocal
rootlocal / pgsql_fts_migration.php
Created December 31, 2017 05:23 — forked from Insolita/pgsql_fts_migration.php
Полнотекстовый поиск postgres+yii2 - миграция
<?php
use yii\db\Migration;
class m170105_004305_add_fts extends Migration
{
public function safeUp()
{
/*
@rootlocal
rootlocal / create_php_site.sh
Created November 26, 2017 20:43 — forked from jun9/create_php_site.sh
Nginx and PHP-FPM, bash script for creating new vhost’s under separate fpm pools
#!/bin/bash
# @author: Seb Dangerfield
# http://www.sebdangerfield.me.uk/?p=513
# Created: 11/08/2011
# Modified: 07/01/2012
# Modified: 17/05/2012
# Modify the following to match your system
NGINX_CONFIG='/etc/nginx/sites-available'
NGINX_SITES_ENABLED='/etc/nginx/sites-enabled'