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
/** | |
* turn off output buffering cleanly | |
*/ | |
function turnoff_buffering() { | |
while ( ob_get_level() > 0 ) { | |
ob_end_clean(); | |
} | |
} |
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 file2array( $file ) { | |
return file_exists( $file ) | |
? array_filter( array_map( 'chop', file( $file ) ) ) | |
: array(); | |
} |
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 | |
class AllTests extends GroupTest { | |
function AllTests() { | |
$this->add( realpath('.') ); | |
} | |
function add( $dir = null ) { | |
if ( $dh = opendir( $dir ) ) { | |
while ( ($e = readdir( $dh )) !== false ) { | |
$path = $dir.DIRECTORY_SEPARATOR.$e; |
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 | |
/** | |
* folding for mainly Japanese | |
* | |
* @license Two-clause BSD | |
*/ | |
/** | |
* fold | |
* |
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
#! /usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
require 'logger' | |
=begin | |
WHATIS | |
* ping monitoring once every 30 secs |
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
#! /usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
require 'optparse' | |
require 'rubygems' unless defined? Gem | |
require 'nokogiri' | |
require 'highline' | |
$KCODE = 'u' unless defined? Encode | |
class Skype_Html_Log_Parser |
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
deny access by IP addr | |
<VirtualHost 192.168.0.1:80> | |
ServerName 192.168.0.1 | |
<Location /> | |
Deny from all | |
</Location> | |
</VirtualHost> |
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
$ time find pctraining | cpio -o | bzip2 > pctraining.cpio.bz2 | |
find pctraining 0.00s user 0.01s system 59% cpu 0.025 total | |
cpio -o 0.11s user 0.20s system 5% cpu 5.455 total | |
bzip2 > pctraining.cpio.bz2 5.06s user 0.08s system 91% cpu 5.604 total | |
$ time find pctraining | cpio -o | pbzip2 > pctraining.cpio.pbz2 | |
find pctraining 0.00s user 0.01s system 52% cpu 0.026 total | |
cpio -o 0.10s user 0.19s system 15% cpu 1.940 total | |
pbzip2 > pctraining.cpio.pbz2 3.64s user 0.20s system 160% cpu 2.397 total |
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
@@ -25,7 +25,7 @@ | |
# probably should define those extensions to indicate media types: | |
# | |
AddType application/x-compress .Z | |
-AddType application/x-gzip .gz .tgz | |
+#AddType application/x-gzip .gz .tgz | |
AddType application/x-bzip2 .bz2 | |
# |
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 | |
ARCHIVE=logs.gz.tar | |
# | |
# create files | |
# | |
echo "create dummy files ..." | |
for i in `awk ' | |
BEGIN { |