Skip to content

Instantly share code, notes, and snippets.

@komeda-shinji
komeda-shinji / gist:d2cfa8008b02cd4d0468
Last active February 23, 2016 10:05
Mailman: disable X-BeenThere, disable Cc when full personalize, disable notification if bounce_you_are_disabled_warnings_interval ==0
diff -u Mailman/Queue/CommandRunner.py- Mailman/Queue/CommandRunner.py
--- Mailman/Queue/CommandRunner.py- 2015-04-03 22:03:27.000000000 +0900
+++ Mailman/Queue/CommandRunner.py 2015-04-22 19:28:34.221206025 +0900
@@ -244,6 +244,9 @@
syslog('vette', 'replied and discard')
# w/discard
return False
+ if hasattr(mlist, 'ignore_requests') and mlist.ignore_requests:
+ syslog('vette', 'ignore and discard')
+ return False
@komeda-shinji
komeda-shinji / file0.txt
Created April 10, 2015 06:35
Mailman の会員検索で、マルチバイトな会員名での検索ができない ref: http://qiita.com/komeda-shinji/items/0d8f1e3b03018d9c4cca
--- Mailman/Cgi/admin.py 2014-02-04 02:09:14.000000000 +0900
+++ Mailman/Cgi/admin.py 2015-04-10 15:13:58.810916527 +0900
@@ -900,12 +900,16 @@
# The email addresses had /better/ be ASCII, but might be encoded in the
# database as Unicodes.
all = [_m.encode() for _m in mlist.getMembers()]
all.sort(lambda x, y: cmp(x.lower(), y.lower()))
# See if the query has a regular expression
regexp = cgidata.getvalue('findmember', '').strip()
+ try:
java.lang.RuntimeException: java.lang.RuntimeException: no available config.
at jp.co.infocity.a.a.a(Unknown Source)
at jp.co.infocity.ebook.core.view.d$b.a(Unknown Source)
at jp.co.infocity.a.b.b$a.a(Unknown Source)
at jp.co.infocity.a.b.b$1.surfaceChanged(Unknown Source)
at android.view.SurfaceView.updateWindow(SurfaceView.java:544)
at android.view.SurfaceView.access$000(SurfaceView.java:81)
at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:169)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:590)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1711)
@komeda-shinji
komeda-shinji / dpkg.py
Last active August 29, 2015 14:21
Products/DataCollector/plugins/zenoss/cmd/linux/dpkg.py
#
__doc__ = """
zenoss.cmd.linux.dpkg finds various software packages installed on a device.
Invoke dpkg command via SSH session.
"""
import re
from Products.DataCollector.plugins.CollectorPlugin \
@komeda-shinji
komeda-shinji / rpm.py
Last active August 29, 2015 14:21
Products/DataCollector/plugins/zenoss/cmd/linux/rpm.py
#
__doc__ = """
zenoss.cmd.linux.rpm finds various software packages installed on a device.
Invoke rpm command via SSH session.
"""
from Products.DataCollector.plugins.CollectorPlugin \
import LinuxCommandPlugin, SoftwareCommandPlugin
@komeda-shinji
komeda-shinji / unbound.xml
Created June 10, 2015 21:55
svc:/network/dns/unbound
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<!--
Copyright 2007-2010 Men & Mice. All rights reserved.
Use is subject to license terms.
-->
<service_bundle type='manifest' name='unbound'>
<service
@komeda-shinji
komeda-shinji / gist:7448c6f4a9a1fae9060f
Last active August 29, 2015 14:23
GNU screen bug #16666: "[PATCH] Support for UAX#11 East Asian Ambiguous characters" should be exclude BOX DRAWINGS characters
--- encoding.c 2014-04-26 20:32:54.000000000 +0900
+++ encoding.c 2015-06-27 04:04:26.000000000 +0900
@@ -1005,8 +1005,13 @@
{ 0x2264, 0x2267 }, { 0x226A, 0x226B }, { 0x226E, 0x226F },
{ 0x2282, 0x2283 }, { 0x2286, 0x2287 }, { 0x2295, 0x2295 },
{ 0x2299, 0x2299 }, { 0x22A5, 0x22A5 }, { 0x22BF, 0x22BF },
+#if 0
{ 0x2312, 0x2312 }, { 0x2460, 0x24E9 }, { 0x24EB, 0x254B },
{ 0x2550, 0x2573 }, { 0x2580, 0x258F }, { 0x2592, 0x2595 },
+#else
@komeda-shinji
komeda-shinji / getbody
Created July 1, 2015 07:02
forward mail body part only
#!/usr/bin/perl
use Getopt::Long;
$TRUNCATE_AT = 32000;
$OMIT_RECEIVED = 1;
$OMIT_MESSAGE_ID = 0;
$OMIT_RESENT_ANY = 0;
@komeda-shinji
komeda-shinji / rrdtool.spec
Created July 16, 2015 11:33
rrdtool.spec diff
--- /root/rpmbuild/SPECS/rrdtool.spec 2012-04-06 06:40:37.000000000 +0900
+++ rrdtool.spec 2015-07-16 00:17:20.807304808 +0900
@@ -2,8 +2,15 @@
# Authority: matthias
# Upstream: Tobi Oetiker <oetiker$ee,ethz,ch>
+%define _prefix /usr/local
+%define _exec_prefix %{_prefix}
+%define _datadir %{_prefix}/share
+%define _libdir %{_exec_prefix}/lib64
@komeda-shinji
komeda-shinji / rrdcached.local.init
Created July 16, 2015 11:42
diff -u rrdcached.init rrdcached.local.init
diff -u /root/rpmbuild/SOURCES/rrdcached.init /root/rpmbuild/SOURCES/rrdcached.local.init
--- /root/rpmbuild/SOURCES/rrdcached.init 2011-04-15 08:01:11.000000000 +0900
+++ /root/rpmbuild/SOURCES/rrdcached.local.init 2015-07-17 05:40:35.068703869 +0900
@@ -17,7 +17,7 @@
. /etc/rc.d/init.d/functions
prog=rrdcached
-rrdcached=/usr/bin/rrdcached
+rrdcached=/usr/local/bin/rrdcached
pidfile=/var/rrdtool/rrdcached/rrdcached.pid