Skip to content

Instantly share code, notes, and snippets.

@tunght13488
tunght13488 / gist:2139608
Created March 20, 2012 18:45
PHP: Class Header
/**
* Short description for class
*
* Long description for class (if any)...
*
* @category CategoryName
* @package PackageName
* @author Original Author <author@example.com>
* @author Another Author <another@example.com>
* @copyright 1997-2005 The PHP Group
@tunght13488
tunght13488 / gist:2139616
Created March 20, 2012 18:46
PHP: File Header
/**
* Short description for file
*
* Long description for file (if any)...
*
* PHP version 5
*
* LICENSE: This source file is subject to version 3.01 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_01.txt. If you did not receive a copy of
@tunght13488
tunght13488 / gitproxy-socat
Created March 21, 2012 07:34 — forked from sit/gitproxy-socat
A simple wrapper around socat to use as a git proxy command
#!/bin/sh
# Use socat to proxy git through an HTTP CONNECT firewall.
# Useful if you are trying to clone git:// from inside a company.
# Requires that the proxy allows CONNECT to port 9418.
#
# Save this file as gitproxy somewhere in your path (e.g., ~/bin) and then run
# chmod +x gitproxy
# git config --global core.gitproxy gitproxy
#
# More details at http://tinyurl.com/8xvpny
@tunght13488
tunght13488 / hack.sh
Created March 31, 2012 11:56 — 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
#
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
// @KarlHillesland, @rexguo, @tom_forsyth, @bkaradzic, @MikeNicolella
// and myself.
@tunght13488
tunght13488 / summary
Created August 20, 2013 02:36 — forked from phaedryx/summary
Original text here: http://www.heartmindcode.com/blog/2013/08/loyalty-and-layoffs/
web: /usr/local/sbin/nginx -p `pwd`/tmp/nginx/ -c ../../nginx.conf
fastcgi: /usr/local/sbin/php-fpm
db: /usr/local/bin/mysqld
@tunght13488
tunght13488 / fastcgi_php.conf
Created September 18, 2013 06:32
Apache & PHP-FPM
# Configure all that stuff needed for using PHP-FPM as FastCGI
# Set handlers for PHP files.
# application/x-httpd-php phtml pht php
# application/x-httpd-php3 php3
# application/x-httpd-php4 php4
# application/x-httpd-php5 php
<FilesMatch ".+\.ph(p[345]?|t|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<VirtualHost *:80>
DocumentRoot "/path/to/source"
ServerName hostname.local
ServerAlias hostname.dev hostname.loc hostname.*.xip.io
ErrorLog "/var/log/hostname-error_log"
CustomLog "/var/log/hostname-access_log" common
<Directory "/path/to/source">
Options Indexes FollowSymLinks ExecCGI MultiViews
AllowOverride All
Order allow,deny