Skip to content

Instantly share code, notes, and snippets.

View mumumu's full-sized avatar

Yoshinari Takaoka mumumu

View GitHub Profile
diff --git a/tcpd/libcouriertls.c b/tcpd/libcouriertls.c
index 199015e..b24ccc3 100644
--- a/tcpd/libcouriertls.c
+++ b/tcpd/libcouriertls.c
@@ -333,6 +333,7 @@ static void load_dh_params(SSL_CTX *ctx, const char *filename,
}
static int read_certfile(SSL_CTX *ctx, const char *filename,
+ const char *private_key_filename,
int *cert_file_flags)
@mumumu
mumumu / sylpheed_vi_less_keybind_patch_on_summaryview.patch
Last active May 4, 2018 11:07
sylpheed vi/less keybind patch on summaryview
Index: src/summaryview.c
===================================================================
--- src/summaryview.c (revision 3616)
+++ src/summaryview.c (working copy)
@@ -6122,22 +6122,26 @@
((event->state & (GDK_SHIFT_MASK|GDK_MOD1_MASK)) != 0);
switch (event->keyval) {
- case GDK_space: /* Page down or go to the next */
- case GDK_KP_Space:
@mumumu
mumumu / memo_letsencrypt_wildcard.txt
Created May 3, 2018 19:40
手元の環境で letsencrypt の wildcard 証明書を取ってみたメモ
mumumu@mailserver 23:27:14 ~/certbot [master] $ ./certbot-auto
Requesting to rerun ./certbot-auto with root privileges...
Bootstrapping dependencies for RedHat-based OSes... (you can skip this with --no-bootstrap)
yum は /bin/yum です
yum はハッシュされています (/bin/yum)
読み込んだプラグイン:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* epel: mirror.dmmlabs.jp
* extras: ftp.iij.ad.jp
@mumumu
mumumu / gcd.c
Created February 11, 2011 19:15
#include <stdio.h>
#include <stdlib.h>
/*
* a と b の最大公約数を求める関数 gcd
* a と b が負の数でも通用する。
*
* ----
*
* これは、以下が自明であることを利用している
@mumumu
mumumu / tasks.py.count_results.patch
Created October 13, 2017 09:52
[PATCH] output parallel task execution result stats
--- fabric/tasks.py 2017-04-24 19:28:00.000000000 -0400
+++ fabric/tasks.py.new 2017-10-13 09:41:45.617000206 -0400
@@ -409,6 +409,22 @@
# This prevents Fabric from continuing on to any other tasks.
# Otherwise, pull in results from the child run.
ran_jobs = jobs.run()
+ print "----"
+ from collections import Counter
+ c = Counter()
+ failed_hosts = []
#!/usr/bin/env python
# encoding: utf-8
import sys
#
# Note: This code works on Python2 only!
#
ignore_functions = [
@mumumu
mumumu / fix-invalid-atom-log-url.md
Last active March 10, 2017 08:25
Mercurial へ atom feed url が違うんでね? と patch を送った
@mumumu
mumumu / about_redis_py_3.0_compatibility.md
Last active December 27, 2015 21:31
redis-py の 3.0 以降に加わったコマンドへの対応について

redis-py の 3.0 以降に加わったコマンドへの対応について

3.0 以降に入ったコマンドやimprovement に対する対応が一切入っていない
皆それはわかっているが、patch が投稿されていないっぽいように見える

3.2 がそろそろ出るタイミングなので、いつまでもビルド環境が 2.8 なのもどうかと思う。
よって、redis-py で 3.0 以降に対応された機能の対応状況やビルド環境について調べ、patch をどう送るかを考える

3.0 以降の機能がPRされた例

@mumumu
mumumu / lvs_my_summary.md
Created December 27, 2015 19:44
LVS(Linux Virtual Server) 自分まとめ
@mumumu
mumumu / redis_py_cluster_readonly_mode.md
Last active December 25, 2015 16:17
redis-py-cluster READONLY mode implementation considerations.

redis-py-cluster READONLY モード 対応

  • Redis Cluster の Python クライアントに READONLY モードを実装する
  • http://redis.io/topics/cluster-spec#scaling-reads-using-slave-nodes
  • デフォルトでは、Redis Cluster の Slave には直接アクセスできない
  • リダイレクトされるだけ
  • それを、READONLY な接続であると宣言することで、アクセスできるようにする

考慮しなければならないこと