This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
/* | |
* MCrypt API available online: | |
* http://linux.die.net/man/3/mcrypt | |
*/ | |
#include <mcrypt.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pwd | |
/var/www/html | |
# ls | |
wordpress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "AFHTTPSessionManager.h" | |
@interface Hoge : NSObject | |
+ (Hoge*)sharedClient; | |
- (void)hogeWithId:(NSString *)hogeId completion:(void (^)(NSDictionary *results, NSError *error))block; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH="$HOME/.rbenv/bin:$PATH" | |
eval "$(rbenv init -)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://rubygems.org" | |
gem "faraday" | |
gem "faraday_middleware" | |
gem "hashie" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# 1. my.cnf か SHOW VARIABLES の結果を入力にとる | |
# 2. 入力を解析し、必要なパラメータ値を取得する | |
# 3. 計算 | |
# 4. 結果を標準出力に出力する | |
require 'optparse' | |
require 'bigdecimal' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 4.6s user time, 280ms system time, 40.89M rss, 287.59M vsz | |
# Current date: Tue Aug 5 07:36:47 2014 | |
# Hostname: ip-172-31-23-18 | |
# Files: tmp/mysql-slow.log.20140805-072831 | |
# Overall: 9.98k total, 41 unique, 25.28 QPS, 0.46x concurrency __________ | |
# Time range: 2014-08-05 07:21:41 to 07:28:16 | |
# Attribute total min max avg 95% stddev median | |
# ============ ======= ======= ======= ======= ======= ======= ======= | |
# Exec time 183s 4us 7s 18ms 95ms 79ms 194us | |
# Lock time 557ms 0 4ms 55us 185us 85us 42us |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SEC=`date --iso-8601=seconds` | |
DATE=`date +'%Y%m%d-%H%M%S'` | |
## NGINX | |
echo NGINX REPORT | |
# LTSVなログ前提 | |
LOG_BASE=/home/isucon/tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lock '3.2.1' | |
set :pty, true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# 1. my.cnf か SHOW VARIABLES の結果を入力にとる | |
# 2. 入力を解析し、必要なパラメータ値を取得する | |
# 3. 計算 | |
# 4. 結果を標準出力に出力する | |
require 'optparse' | |
require 'bigdecimal' |