Skip to content

Instantly share code, notes, and snippets.

Yamamoto, Hirotaka ymmt2005

Block or report user

Report or block ymmt2005

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ymmt2005
ymmt2005 / ipv6_linklocal.cpp
Created Aug 12, 2014
IPv6 link local address resolution
View ipv6_linklocal.cpp
#include <arpa/inet.h>
#include <ifaddrs.h>
#include <iostream>
#include <netdb.h>
#include <sys/socket.h>
#include <sys/types.h>
int main() {
struct ifaddrs* addr;
getifaddrs(&addr);
View virtinst_macvtap.patch
diff -ru virtinst-0.600.4.orig/virtinst/cli.py virtinst-0.600.4/virtinst/cli.py
--- virtinst-0.600.4.orig/virtinst/cli.py 2013-03-23 01:12:13.000000000 +0900
+++ virtinst-0.600.4/virtinst/cli.py 2014-10-15 17:25:26.946638800 +0900
@@ -1684,6 +1684,8 @@
set_param("bridge", "bridge")
set_param("model", "model")
set_param("macaddr", "mac")
+ set_param("source_dev", "source")
+ set_param("source_mode", "source_mode")
@ymmt2005
ymmt2005 / mod_proxy.patch
Created Oct 24, 2014
proxy handler support backport from 2.4.10 to 2.4.7 for Ubuntu 14.04
View mod_proxy.patch
--- apache2-2.4.7/modules/proxy/mod_proxy.c 2013-11-16 02:07:52.000000000 +0900
+++ httpd-2.4.10/modules/proxy/mod_proxy.c 2014-06-21 22:47:30.000000000 +0900
@@ -744,22 +744,52 @@
*/
const char *proxyname = r->filename + 6;
int j;
+ apr_pool_t *rxpool = NULL;
for (j = 0; j < num_sec; ++j)
{
@ymmt2005
ymmt2005 / memcache_text_speed.cpp
Created Nov 21, 2014
Benchmarking yrmcds memcache text parser.
View memcache_text_speed.cpp
#include "../src/memcache/memcache.hpp"
#include <cybozu/test.hpp>
#include <cassert>
#include <cerrno>
#include <cstdint>
#include <cstring>
#include <ctime>
#include <iostream>
@ymmt2005
ymmt2005 / hoge.cpp
Last active Aug 29, 2015
shutdown and recv
View hoge.cpp
// g++ -std=gnu++11 hoge.cpp -lpthread
#include <cerrno>
#include <chrono>
#include <cstring>
#include <iostream>
#include <netdb.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <system_error>
@ymmt2005
ymmt2005 / debian-installer.patch
Created Apr 25, 2015
Add OMSA to netboot initrd image.
View debian-installer.patch
diff -ruN debian-installer-20101020ubuntu318.15.orig/build/boot/x86/syslinux.cfg debian-installer-20101020ubuntu318.15/build/boot/x86/syslinux.cfg
--- debian-installer-20101020ubuntu318.15.orig/build/boot/x86/syslinux.cfg 2014-06-03 23:02:21.000000000 +0000
+++ debian-installer-20101020ubuntu318.15/build/boot/x86/syslinux.cfg 2015-04-06 02:21:48.031746385 +0000
@@ -1,5 +1,10 @@
# D-I config version 2.0
include ${SYSDIR}menu.cfg
-default ${SYSDIR}vesamenu.c32
+#default ${SYSDIR}vesamenu.c32
+# Cybozu: auto start PXE
+default auto
View hello.cpp
#include <cerrno>
int main( int argc, char** argv ) {
return std::errno;
}
@ymmt2005
ymmt2005 / xztest.cpp
Created Apr 11, 2012
xz block encode/decode
View xztest.cpp
#include "util.hpp"
#include <Poco/File.h>
#include <lzma.h>
#include <vector>
#include <iostream>
#include <cstddef>
#include <cstring>
#include <cstdlib>
@ymmt2005
ymmt2005 / passphrase.py
Created Apr 24, 2012
pass phrase generator for Japanese
View passphrase.py
# -*- coding: utf-8 -*-
'''
パスフレーズがいいらしい
→ 日本人なんだから日本語フレーズがいいに決まっている
いい辞書ないかな
pubdic+
http://www.remus.dti.ne.jp/~endo-h/wnn/
平仮名→ローマ字
View gist:3300419
$ sudo /sbin/mdadm -A /dev/md/a -R --auto=md --symlink=no --update=devicesize /dev/sda
Size was 2097128
Size is 2097128
mdadm: /dev/md/a has been started with 1 drive (out of 2).
$ ls -l /dev/md
total 0
lrwxrwxrwx 1 root root 8 Aug 9 02:28 a -> ../md127
$ sudo /sbin/mdadm -A /dev/md/b -R --auto=md --symlink=no --update=devicesize /dev/sdb
You can’t perform that action at this time.