- OFPT_* messages
- /* Immutable messages. */
- OFPT_HELLO ... TEST, DOC (とりあえず完了)
- OFPT_ERROR ... TEST, DOC (とりあえず完了)
- OFPT_ECHO_REQUEST ... TEST, DOC (とりあえず完了)
- OFPT_ECHO_REPLY ... TEST, DOC (とりあえず完了)
- OFPT_VENDOR ... TEST, DOC (とりあえず完了)
- /* Switch configuration messages. */
- OFPT_FEATURES_REQUEST ... TEST, DOC (とりあえず完了)
- OFPT_FEATURES_REPLY ... TEST, DOC
This file contains hidden or 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
require "rake/tasklib" | |
require "roodi" | |
require "roodi_task" | |
RoodiTask.new do | t | | |
t.patterns = %w(lib/**/*.rb spec/**/*.rb features/**/*.rb) | |
end |
This file contains hidden or 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
require "rake/tasklib" | |
require "flay" | |
require "flay_task" | |
FlayTask.new do | t | | |
# add directories such as app, bin, spec and test if need be. | |
t.dirs = %w( lib ) | |
t.threshold = 0 | |
end |
This file contains hidden or 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
require "reek/rake/task" | |
# | |
# See the follwing URL for details: | |
# http://wiki.github.com/kevinrutherford/reek/rake-task | |
# | |
Reek::Rake::Task.new do | t | | |
t.fail_on_error = true | |
t.verbose = false |
This file contains hidden or 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
require "rake/tasklib" | |
require "flog" | |
desc "Analyze for code complexity" | |
task :flog do | |
flog = Flog.new | |
flog.flog [ "lib" ] | |
threshold = 10 |
This file contains hidden or 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
require "irb/xmp" | |
# ヒストリの設定 | |
require "irb/ext/save-history" | |
IRB.conf[ :EVAL_HISTORY ] = 10000 | |
IRB.conf[ :USE_READLINE ] = true | |
IRB.conf[ :SAVE_HISTORY ] = 10000 | |
IRB.conf[ :HISTORY_PATH ] = File::expand_path( "~/.irb_history" ) |
This file contains hidden or 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
#!ruby -n | |
p eval'"#{$`%1$s+$&%1$s}"%1$s'%".reverse.to_i"if/ .+/ |
This file contains hidden or 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
// たとえばこういうシグニチャの関数があったとして、 | |
// こいつをテストの実行時に mock 関数に置き換えたいとする | |
void die( const char *format, ... ); | |
// die.h では関数ポインタを公開する (extern)。 | |
extern void ( *die )( const char *format, ... ); | |
// die.c では関数ポインタを定義してて、 | |
// 同時にデフォルトの実装 _die() を代入してやる |
This file contains hidden or 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
(add-to-load-path "~/.emacs.d/yasuhito/gist.el") | |
(require 'gist) | |
(setq gist-authenticate-function 'gist-basic-authentication) | |
(global-set-key (kbd "<f8>") 'gist-region-or-buffer) |
This file contains hidden or 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
;;; 行末の空白を表示 | |
(setq-default show-trailing-whitespace t) |
OlderNewer