Skip to content

Instantly share code, notes, and snippets.

@tunght13488
tunght13488 / Development checklist
Last active August 29, 2015 14:08
Development checklist
- [ ] Is error reporting on and display errors on in development and off in production?
- [ ] Do not suppress errors in your code.
- [ ] Implement a logging framework.
- [ ] Use a caching strategy.
- [ ] Keep in mind and use programming design patterns and best practices.
- [ ] Use tests in your code and try to automate running these tests every time a change occurs in the code base.
- [ ] Review or at least audit team members’ code.
- [ ] Practice defensive programming.
- [ ] Learn and use OOP principles correctly.
- [ ] Have a solid workflow and processes for developing and deploying code.
$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
$ brew install -v /usr/local/Library/Taps/homebrew/homebrew-php/Formula/php54.rb
==> Downloading http://www.php.net/get/php-5.4.33.tar.bz2/from/this/mirror
Already downloaded: /Library/Caches/Homebrew/php54-5.4.33
==> Verifying php54-5.4.33 checksum
tar xf /Library/Caches/Homebrew/php54-5.4.33
Warning: Backing up all known pear.conf and .pearrc files
Warning: If you have a pre-existing pear install outside
of homebrew-php, or you are using a non-standard
pear.conf location, installation may fail.
==> ./configure --prefix=/usr/local/Cellar/php54/5.4.33 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.4 --with-config-file-path=/usr/local/etc/php/5.4 --with-config-file-scan-dir=/usr/local/etc/php/5.4/conf.d --with-iconv-dir=/usr --enable-dba --with-ndbm=/usr --enable-exif --enable-intl --enable-soap --enable-wddx --enable-ftp --enable-sockets --enable-zip --enable-shmop --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-mbstring --enable-mbregex --enable-bcmath --enable
#!/usr/bin/perl
use Mysql;
use strict;
use vars qw($school_name);
use vars qw($pass);
require "./cgi-lib.pl";
<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
@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>
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 / summary
Created August 20, 2013 02:36 — forked from phaedryx/summary
Original text here: http://www.heartmindcode.com/blog/2013/08/loyalty-and-layoffs/
// 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.