NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
| /** | |
| * truncatable - jQuery lightweight text truncation plugin | |
| * | |
| * Adapted from Philip Beel's code http://theodin.co.uk/blog/development/truncatable-jquery-plugin.html | |
| * | |
| * Copyright (c) 2010 Nicolas Perriault (http://prendreuncafe.com/blog/) | |
| * Copyright (c) 2009 Philip Beel (http://www.theodin.co.uk/) | |
| * | |
| * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) | |
| * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. |
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
| # put this in config/initializer/fields_with_errors.rb | |
| ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| | |
| if html_tag =~ /<(input|label|textarea|select)/ | |
| error_class = 'error' | |
| doc = Nokogiri::XML(html_tag) | |
| doc.children.each do |field| | |
| unless field['type'] == 'hidden' | |
| unless field['class'] =~ /\berror\b/ |
| @mixin linear-gradient($angle, $color1, $offset1, $color2 ,$offset2:100, $color3:null, $offset3:100, $color4:null, $offset4:100, $color5:null, $offset5:100){ | |
| $angle_webkit:'left top, left bottom'; | |
| $angle_svg:'%20x2%3d%220%25%22%20y2%3d%22100%25%22'; | |
| $color-stop1_css:'#'#{$color1}' '#{$offset1}'%'; | |
| $color-stop2_css:',#'#{$color2}' '#{$offset2}'%'; | |
| $color-stop3_css:''; | |
| $color-stop4_css:''; | |
| $color-stop5_css:''; | |
| $color-stop1_svg:'%3cstop%20style%3d%22stop%2dcolor%3a%23'#{$color1}'%22%20offset%3d%22'#{$offset1}'%25%22%2f%3e'; | |
| $color-stop2_svg:'%3cstop%20style%3d%22stop%2dcolor%3a%23'#{$color2}'%22%20offset%3d%22'#{$offset2}'%25%22%2f%3e'; |
| function! CSS3PropertyDuplicate() | |
| let reg_save = @@ | |
| silent normal Y | |
| let css3 = @@ | |
| let ind = matchlist(css3, '\v(\s*)(.*)') | |
| let webkit = ind[1] . "-webkit-" . ind[2] | |
| let moz = ind[1] . "-moz-" . ind[2] | |
| let ms = ind[1] . "-ms-" . ind[2] | |
| let o = ind[1] . "-o-" . ind[2] |
| .hll { background-color: #ffffcc } | |
| .c { color: #586E75 } /* Comment */ | |
| .err { color: #93A1A1 } /* Error */ | |
| .g { color: #93A1A1 } /* Generic */ | |
| .k { color: #859900 } /* Keyword */ | |
| .l { color: #93A1A1 } /* Literal */ | |
| .n { color: #93A1A1 } /* Name */ | |
| .o { color: #859900 } /* Operator */ | |
| .x { color: #CB4B16 } /* Other */ | |
| .p { color: #93A1A1 } /* Punctuation */ |
| @mixin category-colors($after: false) | |
| @each $category in $categories | |
| @if $after == true | |
| .cat-#{nth($category, 1)}:after | |
| background-color: nth($category, 2) | |
| @else | |
| .cat-#{nth($category, 1)} | |
| background-color: nth($category, 2) |
NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
| .highlight{background-color:#073642;color:#93a1a1}.highlight .c{color:#586e75 !important;font-style:italic !important}.highlight .cm{color:#586e75 !important;font-style:italic !important}.highlight .cp{color:#586e75 !important;font-style:italic !important}.highlight .c1{color:#586e75 !important;font-style:italic !important}.highlight .cs{color:#586e75 !important;font-weight:bold !important;font-style:italic !important}.highlight .err{color:#dc322f !important;background:none !important}.highlight .k{color:#cb4b16 !important}.highlight .o{color:#93a1a1 !important;font-weight:bold !important}.highlight .p{color:#93a1a1 !important}.highlight .ow{color:#2aa198 !important;font-weight:bold !important}.highlight .gd{color:#93a1a1 !important;background-color:#372c34 !important;display:inline-block}.highlight .gd .x{color:#93a1a1 !important;background-color:#4d2d33 !important;display:inline-block}.highlight .ge{color:#93a1a1 !important;font-style:italic !important}.highlight .gr{color:#aa0000}.highlight .gh{color:#586e |