- http://www.webpagetest.org/result/121128_KZ_K1/
- http://www.webpagetest.org/result/121128_MQ_J7/
- http://www.webpagetest.org/result/121127_9J_1999/
- http://www.webpagetest.org/result/121128_FH_1AE/
- http://www.webpagetest.org/result/121128_MY_00ad852a58cd2650ccc288290938bc81/
- http://www.webpagetest.org/video/compare.php?tests=121128_KZ_K1,121128_MQ_J7,121127_9J_1999
- http://www.webpagetest.org/video/compare.php?tests=121128_FH_1AE,121128_KZ_K1
- http://www.softwareishard.com/har/viewer/
- http://www.webpagetest.org/result/121128_57_7413290db1527ef7100c1fe221bbcad2/
- http://www.webpagetest.org/compare
This file contains hidden or 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 isStringPresent($needle, $haystack) | |
| { | |
| $result = strstr($haystack, $needle); | |
| if ($result == FALSE) { | |
| return FALSE; | |
| } else { | |
| return TRUE; | |
| } |
This file contains hidden or 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 | |
| // Micro-benchmarks, again, see http://daveyshafik.com/archives/30320-faster-arrays.html | |
| // Results: | |
| // | |
| // regular 1.64 | |
| // preallocated 1.42 | |
| // fixed 0.81 |
This file contains hidden or 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 | |
| // From presentation-layer/application/modules/user/models/Givingpage.php | |
| protected function _setIf($givingPage, $data, $key, $field = null) | |
| { | |
| if ($field === null) { | |
| $field = $key; | |
| } | |
| if (isset($data[$key])) { |
This file contains hidden or 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
| mycallback({ | |
| "count": 10, | |
| "value": { | |
| "title": "test", | |
| "description": "Pipes Output", | |
| "link": "http://pipes.yahoo.com/pipes/pipe.info?_id=bc115235e32da3e0f6db46cd7a159a01", | |
| "pubDate": "Sun, 12 Aug 2012 21:00:39 +0000", | |
| "generator": "http://pipes.yahoo.com/pipes/", | |
| "callback": "mycallback", | |
| "items": [ |
This file contains hidden or 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 snippet to check that apache_server_name resolves to vm_ip (i.e. | |
| # assuming that the rest of the Vagrantfile configures a VM in this way). | |
| apache_server_name = "myproject.local" | |
| vm_ip = "192.168.33.111" | |
| begin | |
| res = Socket::getaddrinfo(apache_server_name, nil, Socket::AF_INET) | |
| rescue SocketError => e | |
| # s doesn't resolve to anything at all |
This file contains hidden or 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
| function onChild(child, event, callback) { | |
| child.on('message', (function (args) { | |
| if (args[0] === event) { | |
| callback.apply(null, Array.prototype.slice.call(args, 1)); | |
| } | |
| })); | |
| } | |
| function emitChild(/* child, event, [arg1], [arg2], [...] */) { | |
| var args = Array.prototype.slice.call(arguments); |
This file contains hidden or 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 | |
| /** | |
| * Similar to print_r(), except that it writes to /tmp/rawlog.log. This function is | |
| * intended for debugging, where you want to be absolutely sure that your output | |
| * is not being captured or buffered or otherwise interfered with. | |
| * | |
| * One good way to ensure this is always available is to use the auto_prepend_file | |
| * php.ini setting. | |
| */ |
This file contains hidden or 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 | |
| array ( | |
| 0 => | |
| array ( | |
| 'file' => '/usr/share/php/BBC/Controller/Plugin/CacheControl.php', | |
| 'line' => 59, | |
| 'function' => 'rawstack', | |
| ), | |
| 1 => |
This file contains hidden or 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/bash | |
| # NOTE: This (sadly) doesn't work in all situations. See | |
| # https://github.com/composer/composer/pull/1083 | |
| # for discussion of some alternatives. | |
| # Checks whether composer.json has changed after checkout, in which | |
| # case you probably need to run 'composer install'. | |
| # | |
| # INSTALLATION |