Skip to content

Instantly share code, notes, and snippets.

ruedap ruedap

Block or report user

Report or block ruedap

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:7358844
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
View gist:6907384
<!-- <div class="block block--modifier"></div> -->
<div class="block--modifier"></div>
@ruedap
ruedap / gist:6193722
Last active Dec 20, 2015
Setup livestyle-vim for Mac
View gist:6193722

Setup livestyle-vim for Mac

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

1. Install golang

View gist:5893733
// 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 Dec 18, 2015
Font Awesome 3.2.1 Icons
View gist:5828756
"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 Dec 18, 2015
Foundation 4.2.1 selectors
View Gemfile
source "https://rubygems.org"
gem 'css_parser'
View app.coffee
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 Dec 15, 2015
clickable and responsive SVG
View clickable_and_responsive_svg.haml
: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')
@ruedap
ruedap / extend.css
Created Mar 9, 2013
Sass: mixin or extend
View extend.css
/* 6 selectors */
.a, .a .b, .a .b .c {
color: red;
}
.a, .a .b, .a .b .c {
font-size: 10px;
}
You can’t perform that action at this time.