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
// http://kubyshkin.ru/posts/installing-php-xdebug-extension-on-mac-os-x-10-7-lion.html | |
MACOSX_DEPLOYMENT_TARGET=10.7 | |
CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" | |
CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" | |
CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" | |
LDFLAGS="-arch i386 -arch x86_64 -bind_at_load" | |
export CFLAGS CXXFLAGS LDFLAGS CCFLAGS MACOSX_DEPLOYMENT_TARGET | |
./configure \ | |
--prefix=/usr \ |
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 | |
// http://talks.php.net/show/perf_tunning/20 | |
// http://talks.php.net/show/perf_tunning/21 | |
function cache_start() | |
{ | |
global $cache_file_name, $age; | |
// a superbly creative way for creating cache files | |
$cache_file_name = __FILE__ . '_cache'; |
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
mike@mikembp:~$ ab -vv -n1000 http://wordpress.localhost/ | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking wordpress.localhost (be patient) | |
Completed 100 requests | |
Completed 200 requests | |
Completed 300 requests | |
Completed 400 requests |
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
mike@mikembp:~/Sites/cms$ svn diff templates/custom/index.php | |
Index: templates/custom/index.php | |
=================================================================== | |
--- templates/custom/index.php (revision 317) | |
+++ templates/custom/index.php (working copy) | |
@@ -21,7 +21,7 @@ | |
<?php if (page_description() != '') echo '<meta name="description" content="' . page_description() . '"/>' ?> | |
<link rel="shortcut icon" href="<?php echo WB_URL; ?>/favicon.ico"> | |
<link type="text/plain" rel="author" href="<?php echo WB_URL; ?>/humans.txt" /> | |
-<link rel="stylesheet" href="<?php echo TEMPLATE_DIR; ?>/css/main.css"/> |
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
bash:~$ siege -q -b -t30s -c50 http://www.google.com | |
Lifting the server siege... done. | |
Transactions: 4544 hits | |
Availability: 100.00 % | |
Elapsed time: 29.06 secs | |
Data transferred: 24.83 MB | |
Response time: 0.31 secs | |
Transaction rate: 156.37 trans/sec |
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
Reading | |
http://pragprog.com/book/dnvim/practical-vim | |
http://stevelosh.com/blog/2010/09/coming-home-to-vim/ | |
http://learnvimscriptthehardway.stevelosh.com/ | |
Watching | |
http://vimcasts.org/ | |
http://derekwyatt.org/vim/vim-tutorial-videos/ |
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 | |
/** | |
* Unset unneeded head stuff | |
* Default filters from wp-includes/default-filters.php | |
**/ | |
remove_action('init','wp_cron'); | |
remove_action('wp_head','rsd_link'); | |
remove_action('wp_head','wlwmanifest_link'); | |
remove_action('wp_head','wp_generator'); | |
remove_action('wp_head','start_post_rel_link'); |
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 | |
define('DB_HOST', 'localhost'); | |
define('DB_USERNAME', 'root'); | |
define('DB_PASSWORD', ''); | |
define('DB_NAME', 'db'); | |
define('TABLE_PREFIX', ''); | |
$GLOBALS['PDO_OPTIONS'] = array( | |
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8', |
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 | |
function convert_email($email) { | |
$new_mail = ''; | |
$pieces = str_split(trim($email)); | |
foreach ($pieces as $val) { | |
$new_mail .= '&#'.ord($val).';'; | |
} | |
return $new_mail; | |
} |
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
-- http://www.percona.com/sites/default/files/presentations/MySQL%20Query%20Patterns%2C%20Optimized.pdf | |
-- SHOW PROFILE -- | |
-- Enable query profiler for the current session. | |
SET PROFILING = 1; | |
SELECT t.title FROM title t; | |
SHOW PROFILES; | |
-- SHOW SESSION STATUS -- | |
FLUSH STATUS; |