Skip to content

Instantly share code, notes, and snippets.

@negima1976
negima1976 / gist:2495321
Created April 26, 2012 02:44
ss_get_by_ssh.php add flare
--- ./ss_get_by_ssh.php 2012-04-26 11:20:50.000000000 +0900
+++ /home/hoge/ss_get_by_ssh.php 2012-04-26 11:39:04.000000000 +0900
@@ -54,6 +54,7 @@
$http_user = 'apache';
$http_pass = '';
$memcache_port = 11211; # Which port memcached listens on
+$flare_port = 12121; # Which port flared listens on
$redis_port = 6379; # Which port redis listens on
# How to get openvz stats
$openvz_cmd = 'cat /proc/user_beancounters';
@negima1976
negima1976 / ketama-sample.php
Created April 10, 2012 09:38
php sample source
<?php
$m = new Memcached();
$m->addServers(array(
array('hoge', 11211, 30),
array('hoge', 11212, 30),
array('hoge', 11213, 30),
));
$m->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE, true);
@negima1976
negima1976 / gist:1496164
Created December 19, 2011 08:54
proftpd-1.3.4a用 NLSTパッチ
--- proftpd-1.3.4a/modules/mod_ls.c 2011-11-06 08:01:58.000000000 +0900
+++ proftpd-1.3.4a/modules/mod_ls_new.c 2011-12-19 16:16:38.000000000 +0900
@@ -1319,10 +1319,8 @@
break;
case 'C':
- if (strcmp(session.curr_cmd, C_NLST) != 0) {
- opt_l = 0;
- opt_C = 1;
- }
grep 'hoge@hogeho.jp' maillog | awk '{print $6}' |parallel 'grep {} maillog'