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
HDD の購入後チェック: | |
・購入直後にSMARTのチェック。 | |
・WDのLifeGuardツールを使って、全体を0fill。 | |
・再度SMARTのチェック。 | |
・WDのLifeGuardツールを使って、全体を検査。 | |
・再度SMARTのチェック。 | |
・クイックフォーマット後に使用開始。 | |
http://bbs.kakaku.com/bbs/K0000186013/SortID=15423934/#tab |
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
module Git | |
def self.current_hash | |
`git rev-parse --short HEAD`.chomp | |
end | |
end | |
task :hash do | |
puts Git.current_hash | |
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
// http://stackoverflow.com/questions/9141249/twitter-bootstrap-css-affecting-google-maps | |
// Below fixes Bootstrap(2.3)'s affection to Google Map V3's control which would be skinny looks. | |
// '#map' is a container of Google Map. | |
#map { | |
img { | |
max-width: none; | |
} | |
label { | |
width: auto; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>closure pattern</title> | |
</head> | |
<body> | |
<div id="target1"> | |
<h1>Target 1</h1> | |
</div> |
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
### | |
# $ coffee -c loop.coffee ; nodejs loop.js | |
### | |
measure = (title, f) -> | |
begin = new Date() | |
f() | |
console.log "#{title}: #{(new Date() - begin)}" | |
times = 10000000 |
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
# coding: utf-8 | |
require 'htmlentities' | |
coder = HTMLEntities.new | |
p coder.encode('Φ', :named) #=> 'Φ' | |
p coder.decode('φ') #=> 'φ' |
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
diff --git a/autoload/unite/sources/outline/defaults/ruby.vim b/autoload/unite/sources/outline/defaults/ruby.vim | |
index eb53c82..116bf81 100644 | |
--- a/autoload/unite/sources/outline/defaults/ruby.vim | |
+++ b/autoload/unite/sources/outline/defaults/ruby.vim | |
@@ -19,6 +19,9 @@ function! unite#sources#outline#defaults#ruby#outline_info(...) | |
if path =~ '_spec\.rb$' | |
" RSpec | |
return 'ruby/rspec' | |
+ elseif path =~ 'Rakefile$' || path =~ '\.rake$' | |
+ " Rake |
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
require 'rack' | |
# Because String#each has taken away since RUBY_VERSION >= 1.9, | |
# Rack::BodyProxy#each causes error ( and when 'use Rakc::CommonLogger' ). | |
# This is the monkey patch to fix it. | |
class String | |
def each(*args, &block) | |
each_line *args, &block | |
end | |
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
require "rubygems" | |
require "middleman-core/load_paths" | |
Middleman.setup_load_paths | |
require "middleman-core" | |
require "middleman-core/preview_server" | |
module Middleman::PreviewServer | |
def self.preview_in_rack |
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
--- pre.rwdImageMaps.js 2013-11-18 05:54:45.588799920 +0900 | |
+++ post.rwdImageMaps.js 2013-11-18 05:53:19.692799931 +0900 | |
@@ -37,6 +37,14 @@ | |
h = temp.height; | |
} | |
+ // To get the natural width and height on Webkit, just use this.(width/height) | |
+ if (!w || !h) { | |
+ if (!w) | |
+ w = this.width; |