Skip to content

Instantly share code, notes, and snippets.

View kskomori's full-sized avatar

Keisuke KOMORI kskomori

View GitHub Profile
@kskomori
kskomori / 55_vs_56.diff
Created January 25, 2018 01:00 — forked from yoku0825/55_vs_56.diff
雑だけど5.5~5.7の秘伝のタレ差分
1c1
< ### template_55.my.cnf revision 20150121
---
> ### template_56.my.cnf revision 20150319
4c4
< socket= __datadir__/mysql.sock #<< /data/path_name
---
> socket= __datadir__/mysql.sock #<<
11a12
> #malloc-lib= /usr/lib64/libjemalloc.so.1
@kskomori
kskomori / ServerrSettingsUbuntu14.04.md
Last active January 24, 2018 06:44
Server settings Ubuntu 14.04

Ubuntu 14.04 LTS でのサーバ設定方法

@kskomori
kskomori / Facebook_messange_echo_rails4.txt
Last active November 1, 2016 11:18
今更ながらFacebook「Messenger Platform(Beta)」を使ったEchoサーバをRails4で書いてみる ref: http://qiita.com/kskomori/items/d12ba058eb738e3326bf
class FbBotController < ApplicationController
protect_from_forgery except: :callback
FB_WEBHOOK_VERIFY_TOKEN="WebHook登録時に入力したトークン"
FB_PAGE_ACCESS_TOKEN="フェイスブックページのページアクセストークン"
# WebHooks登録時コールバックURL
def subscribe
if params["hub.mode".to_sym] != "subscribe"
@kskomori
kskomori / LINEBOT_Echo_rails4.txt
Last active November 1, 2016 11:18
今更ながらLINE BOTのEchoサーバをRails4で簡易的に書いてみる ref: http://qiita.com/kskomori/items/6718babf55a283fe267e
require 'faraday'
class Linebots::BotController < ApplicationController
protect_from_forgery except: :callback
def callback
if request.method != 'POST'
render text: 'NG', status: 500
@kskomori
kskomori / nginx.status.conf
Last active November 1, 2016 11:16
muninでnginxのステータスを確認する ref: http://qiita.com/kskomori/items/09c38224dafe81afe716
location ~ /(nginx_|server-)status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
break;
}
@kskomori
kskomori / file0.txt
Last active April 12, 2016 12:17
SSL証明書のための秘密鍵の作成とCSR作成 ref: http://qiita.com/kskomori/items/ba84ae0bb6a3b5bf6305
$ openssl genrsa -out my-domain-name.2016.key 2048
# path 以下のファイル/ディレクトリ一覧を再帰的に探索
import os, os.path
root_path = '/dir/'
for root, dirs, files in os.walk(root_path):
for file in files:
#print(os.path.join(root, file))
if len(file.encode('utf-8')) > 40:
print(" {}".format(file))