ドキュメント:
$ gem install vagrant
#!ruby | |
# -*- coding: utf-8 -*- | |
require 'open-uri' | |
puts open('http://holiday.fjord.jp/').read.match(%r!<div class="next-holiday">\s*?(\d+月\d+日)\s*?<span>(.*?)</span>!)[1,2].join(' ') |
@mixin background-rgba($r,$g,$b,$a) { | |
// To mimic this in Internet Explorer, you can use the proprietary filter | |
// property to create a gradient with the same start and end color, along | |
// with an alpha transparency value. | |
@if experimental-support-for-microsoft { | |
$color: ie_hex($r,$g,$b,$a); | |
$value: unquote("progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=##{$color},endColorstr=##{$color})"); | |
background-color: transparent\9; |
$eleven40-grid-width: 4.85% !default; // The width of a column | |
$eleven40-grid-margin: 3.8% !default; // The amount of margin between columns | |
@mixin eleven40-container { | |
padding-left: 20px; | |
padding-right: 20px; | |
} | |
@mixin eleven40-row { | |
margin: 0 auto; |
function countCSSRules() { | |
var results = '', | |
log = ''; | |
if (!document.styleSheets) { | |
return; | |
} | |
for (var i = 0; i < document.styleSheets.length; i++) { | |
countSheet(document.styleSheets[i]); | |
} | |
function countSheet(sheet) { |
#!/bin/bash | |
for f in *.scss; do sass-convert $f ${f%scss}sass ; done | |
rm *.scss |
@mixin filter( $var ) | |
-webkit-filter: $var | |
-moz-filter: $var | |
-ms-filter: $var | |
-o-filter: $var | |
filter: $var | |
a | |
&.on | |
@include filter( sepia(100%) hue-rotate(33deg) contrast(69%) unquote("saturate(2)")) |
require 'date' | |
# | |
# 指定された日付が、その月において何週目にあたるのかを計算し、返却します。 | |
# | |
# 週始まりは月曜です。初週を 1 としています。 | |
# | |
def week_of_month(date) | |
first_week = (date - (date.day - 1)).cweek | |
this_week = date.cweek |
ドキュメント:
$ gem install vagrant
require 'active_support/concern' | |
module FrontMatter | |
extend ActiveSupport::Concern | |
included do | |
helper_method :front_matter | |
end | |
def front_matter |