これは超訳です。
CSSLintは「なんでこんなルールなんだ…」とイラっとすることが多いですけど、それぞれにそれなりに理由があります。まぁ勿論無視するべきなルールとかもあります。例えば見出し要素の再定義禁止とかはHTML5に対するCSSなら無理な話です。そんなわけでどんな理由なのかを簡単に訳しました。無視するかどうかは自分で決めましょう!
この訳はCSSLintと同じライセンスで提供されます。
| match = (path, callback) -> | |
| $ -> | |
| param_names = path.match(/:([\w]+)/g) | |
| regexp = new RegExp('^'+path.replace(/:[\w]+/g,'([\\w]+)')+'$') | |
| if m = window.location.pathname.match regexp | |
| m.shift() | |
| params = {} | |
| if param_names | |
| for param_name in param_names | |
| params[param_name] = m.shift() |
| /* | |
| * 'rem' is a Sass mixin that converts pixel values to rem values for whatever property is passed to it. | |
| * It returns two lines of code — one of the regular pixel values (for IE), and another with the | |
| * converted rem values (for everyone else). Special thanks to Chris Epstein (http://chriseppstein.github.com) | |
| * and Martin Bavio (http://martinbavio.com) for the help and code! | |
| * | |
| * Sample input: | |
| * .element { | |
| * @include rem('padding',10px 0 2px 5px); | |
| * } |
| Gem::Specification.new do |s| | |
| s.name = 'bang' | |
| s.version = '0.1.0' | |
| s.platform = Gem::Platform::RUBY | |
| s.author = 'Jeff Kreeftmeijer' | |
| s.email = 'jeff@kreeftmeijer.nl' | |
| s.summary = 'Bang!' | |
| s.description = 'Bangs existing model methods' | |
| s.files = ['bang.rb'] |
| /* | |
| * HTML5 ✰ Boilerplate | |
| * | |
| * What follows is the result of much research on cross-browser styling. | |
| * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal, | |
| * Kroc Camen, and the H5BP dev community and team. | |
| * | |
| * Detailed information about this CSS: h5bp.com/css | |
| * | |
| * ==|== normalize ========================================================== |
NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
| web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb |
| $sprites: sprite-map("sprites/*.png"); | |
| $sprites-retina: sprite-map("sprites-retina/*.png"); | |
| @mixin sprite-background($name) { | |
| background-image: sprite-url($sprites); | |
| background-position: sprite-position($sprites, $name); | |
| background-repeat: no-repeat; | |
| display: block; | |
| height: image-height(sprite-file($sprites, $name)); | |
| width: image-width(sprite-file($sprites, $name)); |
| $! raise された例外オブジェクト | |
| $" require で読み込まれたファイルの配列 | |
| $# | |
| $$ 現在のプロセス ID | |
| $% | |
| $& 正規表現にマッチした箇所の文字列 | |
| $' 正規表現にマッチした箇所より後ろの文字列 | |
| $( | |
| $) | |
| $* Ruby スクリプトに指定された引数。ARGV と同じ |
| # -*- coding: utf-8 -*- | |
| require 'open-uri' | |
| require 'nokogiri' | |
| def get_anime_titles_in(year) | |
| url = "http://ja.wikipedia.org/wiki/Category:#{year}%E5%B9%B4%E3%81%AE%E3%83%86%E3%83%AC%E3%83%93%E3%82%A2%E3%83%8B%E3%83%A1" | |
| titles = [] | |
| open(url, 'r:UTF-8') do |body| | |
| doc = Nokogiri::HTML(body) |