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 5.3 snow leopard | |
# need 64 bit mysql as /usr/local/mysql | |
# compile apache | |
./configure --enable-layout=Darwin --enable-mods-shared=all | |
make | |
sudo make install | |
# now configure php. then make; sudo make install |
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
CFLAGS="-arch x86_64" \ | |
./configure \ | |
--with-apxs2=/usr/sbin/apxs --prefix=/usr/local/php5.2.8 --with-config-file-scan-dir=/usr/local/php5.2.8/php.d \ | |
--with-config-file-path=/usr/local/php5.2.8/php.d \ | |
--disable-posix \ | |
--enable-cli \ | |
--with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config \ | |
--with-jpeg-dir=/opt/local/include --with-png-dir=/opt/local/include --enable-gd-native-ttf --with-freetype-dir=/usr/local/php5.2.8 \ | |
--with-zlib \ | |
--enable-pdo --with-pdo-sqlite --with-sqlite=shared --enable-sqlite-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
var Iamstef = Iamstef || {}; | |
(function(lib){ | |
var url = document.URL, | |
api = {}; | |
api.path = function(regex,fcn){ | |
var result = url.match(regex); | |
if(result){ | |
fcn(result); |
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
tail -f /usr/local/apache2/logs/access.log | awk '{print $1,$7,$10,$8}' |
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
function randomColor() { | |
var color = (0xffffff * Math.random()).toString(16); | |
return "#" + color.replace(/\./i,"").slice(0,6); | |
}; | |
function fallbackFor(arg, fallback) { | |
return (typeof arg !== 'undefined') ? arg : fallback; | |
} | |
function require(arg, name) { |
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
// collapse table sections | |
$(document).ready(function() { | |
$('tbody:has(th)').addClass('collapse') | |
.find('tr:first-child th') | |
.wrapInner('<a href="#"></a>') | |
.find('a') | |
.click(function() { | |
var $thisLink = $(this); | |
$thisLink |
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
PHPLOC by Sebastian Bergmann. | |
Date: 2009-12-12 | |
----------------------- | |
@name Spica Framework | |
@author pcdinh | |
@since March 14, 2009 | |
----------------------- | |
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
import java.util.Random; | |
import org.jredis.JRedis; | |
import org.jredis.RedisException; | |
import org.jredis.ri.alphazero.JRedisClient; | |
public class Redis { | |
private static final int THREAD_COUNT = 2; | |
private static final int SETS_PER_THREAD = 100; | |
private static final int RANDOM_GETS_PER_THREAD = 500; |
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/bash | |
# --- Version history --- | |
# 0.4: added variable to store file path, and $2 for base file name | |
# added variable to store desired reporting interval | |
# 0.3: added $1 to send in process ID at run time. | |
# 0.2: switched to $SECONDS for the loop. works. | |
# 0.1: didn't work well at all. | |
# --- Version history --- | |
# Usage: cputrack [PID] [filename] |
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
[root@m-2 ~]# procstat 32321 | |
pid: 32321 | |
tcomm: (DarwinStreaming) | |
state: S | |
ppid: 32320 | |
pgid: 32320 | |
sid: 32320 | |
tty_nr: 0 | |
tty_pgrp: -1 | |
flags: 4202816 |