Skip to content

Instantly share code, notes, and snippets.

@metafour
metafour / hack.sh
Created March 31, 2012 17:31 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
#!/usr/bin/env sh
brew install dnsmasq;
cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf;
sudo cp -fv /usr/local/opt/dnsmasq/*.plist /Library/LaunchDaemons;
sudo chown root /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist;
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist;
sed -i.bak '/#address=\/double-click\.net\/127\.0\.0\.1/a\
address=/bspot.dev/'$(docker-machine ip vpn-dev) /usr/local/etc/dnsmasq.conf;
sudo launchctl stop homebrew.mxcl.dnsmasq;
@metafour
metafour / php5-fcgi
Last active September 17, 2015 22:29
php5 fastcgi init script
#!/bin/bash
#BIND=127.0.0.1:9000
BIND=/var/run/php/php5-fpm.sock
USER=nginx
PHP_FCGI_CHILDREN=15
PHP_FCGI_MAX_REQUESTS=1000
PHP_CGI=/usr/bin/php-cgi
PHP_CGI_NAME=`basename $PHP_CGI`
PHP_CGI_ARGS="- USER=$USER PATH=/usr/bin PHP_FCGI_CHILDREN=$PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=$PHP_FCGI_MAX_REQUESTS $PHP_CGI -b $BIND"
@metafour
metafour / revive
Last active November 3, 2017 06:11
revive nginx config
# You may add here your
# server {
# ...
# }
# statements for each of your virtual hosts to this file
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls