Skip to content

Instantly share code, notes, and snippets.

Trapfilter tool for snmptrapd.
*** coreutils-8.5/src/tee.c.orig 2010-01-01 22:06:47.000000000 +0900
--- coreutils-8.5/src/tee.c 2010-09-11 01:57:23.000000000 +0900
***************
*** 20,25 ****
--- 20,26 ----
#include <sys/types.h>
#include <signal.h>
#include <getopt.h>
+ #include <time.h>
/* tee - read from standard input and write to standard output and files.
Copyright (C) 1985, 1990-2006, 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff -ruN openssh-6.0p1/Makefile.in openssh-6.0p1-secuireid/Makefile.in
--- openssh-6.0p1/Makefile.in 2012-04-04 10:27:57.000000000 +0900
+++ openssh-6.0p1-secuireid/Makefile.in 2012-08-05 15:37:07.000000000 +0900
@@ -84,6 +84,7 @@
auth-chall.o auth2-chall.o groupaccess.o \
auth-skey.o auth-bsdauth.o auth2-hostbased.o auth2-kbdint.o \
auth2-none.o auth2-passwd.o auth2-pubkey.o auth2-jpake.o \
+ auth2-securid.o \
monitor_mm.o monitor.o monitor_wrap.o kexdhs.o kexgexs.o kexecdhs.o \
auth-krb5.o \
@osamu
osamu / gist:9389100
Created March 6, 2014 13:03
fedora17のpam_ldapでpam_filterが動かないのを調べている
pam_ldap.c
rc = ldap_search_s (session->ld, ssd->base, ssd->scope,
filter, _pam_ldap_attrs, 0, &res);
filter=cn=hogeってすると、以下のようなldapのログがでる
traceroute -I mixi.jp [~]
Password:
traceroute: Warning: mixi.jp has multiple addresses; using 114.31.104.53
traceroute to mixi.jp (114.31.104.53), 64 hops max, 72 byte packets
1 192.168.50.1 (192.168.50.1) 40.175 ms 15.323 ms *
2 * 192.168.25.1 (192.168.25.1) 31.505 ms 22.010 ms
3 77-58-80-1.dclient.hispeed.ch (77.58.80.1) 15.910 ms 16.030 ms 10.624 ms
4 77-58-80-1.dclient.hispeed.ch (77.58.80.1) 11.687 ms 11.876 ms 11.674 ms
5 217-168-57-229.static.cablecom.ch (217.168.57.229) 12.147 ms 14.795 ms 10.896 ms
6 84.116.200.233 (84.116.200.233) 23.298 ms * 29.480 ms
@osamu
osamu / gist:7bcf55e4ebe7223288e6
Created October 14, 2014 17:26
google public dns
障害のとき?
2 yoknimc.asahi-net.or.jp (61.125.204.2) 7.051 ms 7.616 ms 8.179 ms
3 yoknip-ge0.asahi-net.or.jp (61.125.204.30) 6.430 ms 6.464 ms 6.774 ms
4 tkybi1-v5.asahi-net.or.jp (202.224.33.129) 7.785 ms 10.785 ms 8.798 ms
5 tkyni92.asahi-net.or.jp (202.224.32.92) 13.504 ms 8.241 ms 17.343 ms
6 210.173.176.243 (210.173.176.243) 9.013 ms 8.046 ms 8.761 ms
7 209.85.249.64 (209.85.249.64) 9.850 ms 9.911 ms 9.231 ms
8 209.85.255.36 (209.85.255.36) 11.885 ms 12.045 ms 12.258 ms
9 209.85.249.36 (209.85.249.36) 97.773 ms 98.600 ms 108.291 ms
10 216.239.46.210 (216.239.46.210) 120.164 ms 108.933 ms 101.068 ms
@osamu
osamu / foldr.rb
Last active August 29, 2015 14:16
require 'minitest/unit'
module Enumerable
def foldr(*args, &block)
case args.count
when 2
init, method = args
when 1
require 'capistrano'
require 'aws-sdk'
require 'pry'
module Capistrano
module Ec2tag
def self.extend(configuration)
configuration.load do
Capistrano::Configuration.instance.load do
_cset(:access_key_id, ENV['AWS_ACCESS_KEY_ID'])
require 'capistrano'
require 'aws-sdk'
module Capistrano
module Ec2tag
def self.extend(configuration)
configuration.load do
Capistrano::Configuration.instance.load do
_cset(:access_key_id, ENV['AWS_ACCESS_KEY_ID'])
_cset(:secret_access_key, ENV['AWS_SECRET_ACCESS_KEY'])