Skip to content

Instantly share code, notes, and snippets.

@ruedap
ruedap / gist:3734140
Created September 16, 2012 19:55
zshのインストール

zshのインストール

Homebrewからインストール

$ brew install zsh

bashからzshへの移行

使用できるシェル一覧リスト(/etc/shells)にHomebrewからインストールしたzshを追記する。

$ sudo sh -c "echo '/usr/local/bin/zsh' >> /etc/shells"

$ cat /etc/shells

class UploadForm
  include ActiveModel::Model

  attr_accessor :upload_file

  validates_each :upload_file do |record, attr, value|
    if value.present? && value.size > 1.megabytes
      record.errors.add(attr, 'ファイルサイズがビッグだね')
 end
<!-- <div class="block block--modifier"></div> -->
<div class="block--modifier"></div>
@ruedap
ruedap / gist:6193722
Last active December 20, 2015 20:58
Setup livestyle-vim for Mac

Setup livestyle-vim for Mac

  • Mac OS X: 10.8.4
  • MacVim: 7.3 (KaoriYa 20121213)
  • Chrome: 28.0.1500.95

1. Install golang

// Sass 3.2.9
=hoge($c1: #111, $c2: #222, $c3: #333, $c4:#444)
border-top: $c1
border-left: $c2
border-right: $c3
border-bottom: $c4
.hoge
+hoge($c1: #000, $c2: #000, $c4: #000)
@ruedap
ruedap / gist:5828756
Last active December 18, 2015 18:49
Font Awesome 3.2.1 Icons
"compass": u("\uf"),
"collapse": u("\uf"),
"collapse-top": u("\uf"),
"expand": u("\uf"),
"eur": u("\uf"),
"euro": u("\uf"),
"gbp": u("\uf"),
"usd": u("\uf"),
"dollar": u("\uf"),
"inr": u("\uf"),
@ruedap
ruedap / Gemfile
Last active December 18, 2015 00:09
Foundation 4.2.1 selectors
source "https://rubygems.org"
gem 'css_parser'
companies = [{"id":1,"ticker":"AAPL","name":"Apple Inc"},
{"id":2,"ticker":"ABC","name":"Amerisourcebergen Corp"},
{"id":3,"ticker":"ABT","name":"Abbott Labs"},
{"id":4,"ticker":"ACE","name":"Ace Ltd"},
{"id":5,"ticker":"ADBE","name":"Adobe Sys Inc"}]
_.templateSettings = interpolate :/\{\{(.+?)\}\}/g
$ ->
@ruedap
ruedap / clickable_and_responsive_svg.haml
Last active December 15, 2015 02:49
clickable and responsive SVG
:sass
a
display: block
margin: 0 auto
max-width: 500px
object
pointer-events: none
width: 100%
%a(href='http://ruedap.com')
%object(data='ruedap.svg')