Instantly share code, notes, and snippets.

View mytask.rake
require 'thor'
namespace :myns do
class Hammer < Thor
include Thor::Actions
end
desc "Some task."
task :cleanup_files do
View flat_ui_pro.rake
require 'thor'
namespace :flat_ui_pro do
class Hammer < Thor
include Thor::Actions
end
task :thor => ['rake:environment'] do
require 'thor'
View SassMeister-input.scss
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
// Simple String Substitute
//
@function sub($string, $replace, $value) {
$replace-len: str-length($replace);
$replace-start: str-index($string, $replace);
View SassMeister-input.scss
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
$font-stack: Helvetica, sans-serif;
$primary-color: #333;
body {
font: 100% $font-stack;
View SassMeister-input.scss
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
@mixin border-radius($radius) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
-ms-border-radius: $radius;
-o-border-radius: $radius;
View SassMeister-input.scss
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
$std-border-radius: 10px;
@mixin border-radius($radius) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
View SassMeister-input.scss
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
%std-border-radius {
$radius: 10px;
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
View SassMeister-input.scss
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
// Simple String Substitute
@function sub($string, $replace, $value) {
$replace-len: str-length($replace);
$replace-start: str-index($string, $replace);
$string-len: str-length($string);
View foo.scss
$hm-color-names: ( 'inchworm', 'sunglow', 'scarlet');
$hm-colors: ( #a5de37, #ffd426, #ff4351 );
@each $name in $my-color-names {
$index: index($my-color-names, $name);
$color: nth($my-colors, $index);
%my-#{$name}-background-color { background-color: $color; }
%my-#{$name}-border-color { border-color: $color; }
}
View functions.scss
$my-color-names: ( 'inchworm', 'sunglow', 'scarlet');
$my-colors: ( #a5de37, #ffd426, #ff4351 );
@each $name in $my-color-names {
$index: index($my-color-names, $name);
$color: nth($my-colors, $index);
%my-#{$name}-background-color { background-color: $color; }
%my-#{$name}-border-color { border-color: $color; }
}