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 | |
kernel=$(uname -r) | |
kernel=$(echo "${kernel}" | sed -e 's/(.*)//') | |
packages=$(($(cygcheck -cd | wc -l) - 2)) | |
cpu=$(cat /proc/cpuinfo | grep 'model name' | sed -e 's/^.*: *//') | |
# removes (R) and (TM) from the CPU name so it fits in a standard 80 window | |
cpu=$(echo "${cpu}" | awk '$1=$1' | sed 's/([A-Z]\{1,2\})//g') |
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 | |
for var in `compgen -A variable` | |
do | |
if [[ `declare -p $var` =~ "declare -a" ]] | |
then | |
x=`printf '${!%s[@]}' $var` | |
eval "keys=$x" | |
for key in $keys | |
do | |
x=`printf '${%s[%s]}' $var $key` |
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 | |
require_once '../src/phozzil/Phozzil.php'; | |
use phozzil\net\MultiServer; | |
use phozzil\net\MultiServerAdapter; | |
abstract class MultiServerAdapterExample extends MultiServerAdapter | |
{ | |
public function __construct($port) |
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
public function each($function) | |
{ | |
if (!is_callable($function)) { | |
throw new IllegalArgumentException('function must be callable'); | |
} | |
foreach ($this->instance as $index => $key) { | |
$function($key, $this->instance[$key]); | |
} | |
} |
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 | |
fc_add_pre('require_once', 'pre_require_once'); | |
fc_add_post('require_once', 'post_require_once'); | |
require_once 'OS/Guess.php'; | |
function pre_require_once($args) | |
{ | |
printf("pre require_once (%s)\n", $args[0]); |
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
--- origsrc/csv2json/process.c 2011-12-16 01:24:33.000000000 +0900 | |
+++ src/csv2json/process.c 2012-09-25 08:20:48.875314100 +0900 | |
@@ -13,6 +13,7 @@ int process(FILE *file, char *sep) { | |
char *p = buf; | |
list *l = NULL; | |
+ printf("["); | |
while((p = fgets(buf, BUFLEN, file)) != NULL) { | |
if(first) { | |
first = 0; |
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 | |
namespace phozzil\io\archive; | |
use phozzil\io\FileNotFoundException; | |
use phozzil\io\FileSystem; | |
use phozzil\io\IOException; | |
use phozzil\lang\IllegalArgumentException; | |
require_once 'File/Archive.php'; |
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 ThreadExample extends Thread | |
{ | |
public function run() | |
{ | |
$id = $this->getThreadId(); | |
printf("ID[%d] : start & sleep\n", $id); | |
sleep($id % 10); | |
printf("ID[%d] : done\n", $id); | |
} |
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
cygport 0.14.1 | |
PF = libpinyin-1.0.0-1bl2 | |
S = /cygdrive/c/Users/fd0/src/libpinyin/libpinyin-1.0.0-1bl2/src/libpinyin-1.0.0 | |
B = /cygdrive/c/Users/fd0/src/libpinyin/libpinyin-1.0.0-1bl2/build | |
D = /cygdrive/c/Users/fd0/src/libpinyin/libpinyin-1.0.0-1bl2/inst | |
C = /cygdrive/c/Users/fd0/src/libpinyin/libpinyin-1.0.0-1bl2/src/libpinyin-1.0.0/CYGWIN-PATCHES | |
T = /cygdrive/c/Users/fd0/src/libpinyin/libpinyin-1.0.0-1bl2/temp | |
CBUILD = x86_64-pc-cygwin | |
CHOST = x86_64-pc-cygwin |
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
cygport 0.14.1 | |
PF = libpinyin-1.0.0-1bl2 | |
S = /cygdrive/c/Users/fd0/src/libpinyin/libpinyin-1.0.0-1bl2/src/libpinyin-1.0.0 | |
B = /cygdrive/c/Users/fd0/src/libpinyin/libpinyin-1.0.0-1bl2/build | |
D = /cygdrive/c/Users/fd0/src/libpinyin/libpinyin-1.0.0-1bl2/inst | |
C = /cygdrive/c/Users/fd0/src/libpinyin/libpinyin-1.0.0-1bl2/src/libpinyin-1.0.0/CYGWIN-PATCHES | |
T = /cygdrive/c/Users/fd0/src/libpinyin/libpinyin-1.0.0-1bl2/temp | |
CBUILD = x86_64-pc-cygwin | |
CHOST = x86_64-pc-cygwin |
OlderNewer