Skip to content

Instantly share code, notes, and snippets.

Shinya Tsunematsu tnmt

View GitHub Profile
@tnmt
tnmt / stns-query-wrapper.te
Created Dec 19, 2017
STNSのsshクエリラッパー用SELinuxのポリシーファイル
View stns-query-wrapper.te
module stns-query-wrapper 1.0;
require {
type bin_t;
type chkpwd_t;
type policykit_t;
type sshd_t;
type sysctl_net_t;
type sysfs_t;
type system_dbusd_t;
@tnmt
tnmt / ghost-to-hugo.py
Created Sep 25, 2017
data exporter from Ghost (ready for 1.X) to Hugo (also Octopress) data format.
View ghost-to-hugo.py
#!/bin/env python
# coding: utf-8
import os
import json
from datetime import datetime
def main():
# Read the Ghost export file
f = open('GhostData.json', 'r')
View gist:1f50e51faa6dae101cc4a02e3d99e198
InnoDBの要注意パラメータをピックアップしてってる
innodb_adaptive_flushing_lwm
innodb_change_buffer_max_size
innodb_io_capacity
innodb_io_capacity_max
View idea.yml
---
service: minne
enable:
- h2
- mruby
mrbgems:
- mruby-foo
- mruby-bar
@tnmt
tnmt / .zshrc
Created Jun 22, 2015
いつかの.zshrc
View .zshrc
# Emacs style key binding
bindkey -e
# プロンプトのカラー表示を有効
autoload -U colors
colors
# デフォルトの補完機能を有効
autoload -U compinit
compinit
@tnmt
tnmt / ldap_centos6_7.diff
Last active Aug 29, 2015
LDAPでsshログインするときのCentOS6用設定とCentOS7用設定の差分
View ldap_centos6_7.diff
--- modules/ldap/files/password-auth-ac
+++ modules/ldap/files/password-auth-ac
@@ -3,24 +3,25 @@
# User changes will be destroyed the next time authconfig is run.
auth required pam_env.so
auth sufficient pam_unix.so nullok try_first_pass
-auth requisite pam_succeed_if.so uid >= 500 quiet
+auth requisite pam_succeed_if.so uid >= 1000 quiet_success
auth sufficient pam_ldap.so use_first_pass
auth required pam_deny.so
@tnmt
tnmt / pretty_format_fio.pl
Created Aug 8, 2013
fioの出力をgithub wikiのtable形式にフォーマットする
View pretty_format_fio.pl
#!/usr/bin/perl
use strict;
use warnings;
print <<EOT;
- | bandwidth | iops
--------------|-------------|--------
EOT
View fluent-agent-lite conf for some tags
TAG_PREFIX=""
LOGS=$(cat <<"EOF"
tag001 /tmp/log001.log
tag002 /tmp/log002.log
EOF
)
PRIMARY_SERVER="0.0.0.0:24224"
@tnmt
tnmt / cgi_main.diff
Created May 4, 2012
php 5.2.17 patch to CVE-2012-1823
View cgi_main.diff
diff -ur php-5.2.17/sapi/cgi/cgi_main.c php-5.2.17_patched/sapi/cgi/cgi_main.c
--- php-5.2.17/sapi/cgi/cgi_main.c 2010-01-03 18:23:27.000000000 +0900
+++ php-5.2.17_patched/sapi/cgi/cgi_main.c 2012-05-24 20:16:28.000000000 +0900
@@ -62,6 +62,7 @@
#include "php_main.h"
#include "fopen_wrappers.h"
#include "ext/standard/php_standard.h"
+#include "ext/standard/url.h"
#ifdef PHP_WIN32
#include <io.h>
@tnmt
tnmt / mosh-cygwin
Created Apr 17, 2012 — forked from eerohele/mosh-cygwin.md
Compiling Mosh (http://mosh.mit.edu/) under Cygwin
View mosh-cygwin
1. Download Cygwin: http://www.cygwin.com
2. Run setup.exe and install the following packages in addition to the default ones:
- make
- boost
- libncurses-devel
- pkg-config
- perl
3. Download and compile Protocol Buffers: http://code.google.com/p/protobuf/
You can’t perform that action at this time.