Skip to content

Instantly share code, notes, and snippets.

@ihor
ihor / php-fpm-init.d-macos.sh
Last active January 19, 2018 11:57
/etc/init.d/php-fpm script for Homebrew installed PHP-FPM
#!/bin/bash
DAEMON=/usr/local/sbin/php-fpm
OPTS='--fpm-config /usr/local/etc/php5/fpm/php-fpm.conf'
NAME='php-fpm'
DESC=php-fpm
test -x $DAEMON || exit 0
set -e
@ihor
ihor / mysql-init.d-macos.sh
Last active July 13, 2018 19:27
/etc/init.d/mysql script for Homebrew installed MySQL
#!/bin/bash
DAEMON=/usr/local/bin/mysqld_safe
OPTS=--defaults-file=/usr/local/etc/mysql/my.cnf
NAME=mysql
DESC=mysql
test -x $DAEMON || exit 0
set -e
@ihor
ihor / phpstorm-command-line-macos.sh
Last active January 19, 2018 11:56
Run PHPStorm from MacOS X command line (e.g. storm /path/to/project)
#!/usr/bin/python
import socket
import struct
import sys
import os
import os.path
import time
# see com.intelij.idea.SocketLock for the server side of this interface
@ihor
ihor / nginx-init.d-macos.sh
Last active January 19, 2018 11:57
/etc/init.d/nginx script for Homebrew installed Nginx
#!/bin/bash
DAEMON=/usr/local/sbin/nginx
NAME=nginx
DESC=nginx
test -x $DAEMON || exit 0
set -e
test_config() {