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 perl | |
=head1 Examples | |
$ tail -f access_log | perl colorize.pl | |
$ plackup app.psgi 2>&1 | perl colorize.pl | |
=cut | |
use strict; |
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
package Amon2::Plugin::Model; | |
use strict; | |
use warnings; | |
use Module::Find; | |
use Try::Tiny; | |
our $VERSION = '0.01'; | |
sub init { | |
my ($class, $context_class, $config) = @_; |
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: http://d.hatena.ne.jp/umezo/20100508/1273332857 | |
local COMMAND="" | |
local COMMAND_TIME="" | |
precmd() { | |
if [ "$COMMAND_TIME" -ne "0" ] ; then | |
local d=`date +%s` | |
d=`expr $d - $COMMAND_TIME` | |
if [ "$d" -ge "30" ] ; then | |
COMMAND="$COMMAND " |
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
# 競合するgdbがないなら必要ない | |
# 普通にbrewで入れたらgdbコマンドが使える | |
alias gdbnew='/usr/local/Cellar/gdb/7.6/bin/gdb' |
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 perl | |
use strict; | |
use warnings; | |
my @GLOBAL_BUFFERS = qw( | |
key_buffer_size | |
innodb_buffer_pool_size | |
innodb_log_buffer_size | |
innodb_additional_mem_pool_size |
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
#!/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
#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
// Alamofire.swift | |
// | |
// Copyright (c) 2014 Alamofire (http://alamofire.org) | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
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 | |
# coding : utf-8 | |
require 'octokit' | |
require 'csv' | |
require 'date' | |
# Github credentials to access your private project | |
USERNAME="USER_NAME" | |
PASSWORD="SEKRIT" | |
# Project you want to export issues from |
OlderNewer