This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrantfile: | |
target: local | |
vm: | |
box: puphpet/ubuntu1404-x64 | |
box_url: puphpet/ubuntu1404-x64 | |
hostname: itafroma.local | |
memory: '2048' | |
cpus: '2' | |
chosen_provider: virtualbox | |
network: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$foo = [ | |
'bar' => 'value1', | |
'baz' => 'value2', | |
]; | |
print $foo[bar] . PHP_EOL; | |
define('bar', 'baz'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==> make install | |
make install | |
Installing PHP SAPI module: cgi | |
Installing PHP CGI binary: /usr/local/Cellar/php53/5.3.25/bin/ | |
Installing PHP CLI binary: /usr/local/Cellar/php53/5.3.25/bin/ | |
Installing PHP CLI man page: /usr/local/Cellar/php53/5.3.25/share/man/man1/ | |
Installing build environment: /usr/local/Cellar/php53/5.3.25/lib/php/build/ | |
Installing header files: /usr/local/Cellar/php53/5.3.25/include/php/ | |
Installing helper programs: /usr/local/Cellar/php53/5.3.25/bin/ | |
program: phpize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/bin/sh /private/tmp/php54-GFpf/php-5.4.15/libtool --silent --preserve-dup-deps --mode=compile cc -Imain/ -I/private/tmp/php54-GFpf/php-5.4.15/main/ -DPHP_ATOM_INC -I/private/tmp/php54-GFpf/php-5.4.15/include -I/private/tmp/php54-GFpf/php-5.4.15/main -I/private/tmp/php54-GFpf/php-5.4.15 -I/private/tmp/php54-GFpf/php-5.4.15/ext/date/lib -I/private/tmp/php54-GFpf/php-5.4.15/ext/ereg/regex -I/Applications/Xcode5-DP.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2 -I/Applications/Xcode5-DP.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include -I/usr/local/opt/zlib/include -I/usr/local/opt/jpeg/include -I/usr/local/opt/libpng/include -I/usr/local/opt/freetype/include -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/opt/gettext/include -I/private/tmp/php54-GFpf/php-5.4.15/ext/mbstring/oniguruma -I/private/tmp/php54-GFpf/php-5.4.15/ext/mbstring/libmbfl -I/private/tmp/php54-GFpf/php-5.4.15/ext/mbstring/libmbfl/mbfl -I/priv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Don't do this | |
$name = 'Mark'; | |
$query = "UPDATE users SET name = '" . $name . "' WHERE user_id = 1"; | |
$pdo->query($query); | |
// Translates to the query UPDATE users SET name = "Mark" WHERE user_id = 1 | |
// so what's the problem? | |
// | |
// What if we did this instead: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Stack Exchange Search Tamer | |
// @namespace itafroma | |
// @description Only allow the search box to expand if the user starts typing | |
// @include http://stackoverflow.com/* | |
// @include http://*.stackoverflow.com/* | |
// @include http://*.stackexchange.com/* | |
// @include http://serverfault.com/* | |
// @include http://superuser.com/* | |
// @include http://stackapps.com/* |