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 | |
$mc = new Memcached(); | |
$mc->setOption( | |
Memcached::OPT_DISTRIBUTION, | |
Memcached::DISTRIBUTION_CONSISTENT | |
); | |
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
require 'formula' | |
class Ab < Formula | |
homepage 'http://httpd.apache.org/docs/trunk/programs/ab.html' | |
url 'http://www.apache.org/dist/httpd/httpd-2.2.22.tar.bz2' | |
sha1 '766cd0843050a8dfb781e48b976f3ba6ebcf8696' | |
def patches | |
{ | |
# The ab tool of the latest stable httpd (2.4.2) does not work |
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
#!/usr/bin/env ruby | |
require 'net/telnet' | |
#ruby file.rb | |
#ruby file.rb key1, key2, key3 | |
cache_dump_limit = 100000 | |
localhost = Net::Telnet::new("Host" => "localhost", "Port" => 11211, "Timeout" => 3) | |
slab_ids = [] | |
localhost.cmd("String" => "stats items", "Match" => /^END/) do |c| |
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 | |
/** | |
* Kullanımı: php53 compress.php -f abc.js,jsonrpc.js -o all.js | |
* Çıktı olarak all-min.js veya all-min.css isimli bir dosya çıkaracaktır. | |
* Gereksinim: pear install Console_CommandLine | |
*/ | |
/** | |
* YUI compress path | |
*/ | |
$yuic = 'java -jar ~/Development/Tools/yuicompressor-2.4.7/build/yuicompressor-2.4.7.jar '; |
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
require 'formula' | |
class Mysql51 < Formula | |
homepage 'http://dev.mysql.com/doc/refman/5.1/en/' | |
url 'http://mysql.mirrors.pair.com/Downloads/MySQL-5.1/mysql-5.1.56.tar.gz' | |
md5 '15161d67f4830aad3a8a89e083749d49' | |
depends_on 'readline' | |
def options |
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
config.json | |
reading-image.png |
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
test |
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
SUMMARY | |
I like to use kcachegrind for doing profiling on my ruby code. Most of my development | |
is done on OSX, and while you can install kcachegrind via macports, it takes forever | |
because it has to build KDE, as well. Much to my surprise, the fine folks who | |
wrote kcachegrind also made a QT version, qcachegrind. I was able to build this on | |
OSX without too much effort, only having to install QT and GraphViz. Yippie! | |
I'm running OSX 10.6.7, with Xcode 4. My default gcc/g++ version is 4.2. I'm sure | |
it will build just fine on earlier versions of Xcode, but I haven't tested it. |
NewerOlder