This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// reproduce sass darken/lighten/fade function syntax on top of | |
// postcss-color-function (https://github.com/postcss/postcss-color-function) via | |
// postcss-functions https://github.com/andyjansson/postcss-functions | |
// https://github.com/jonathantneal/precss/issues/38 | |
// postcss-sass-colors.js | |
const colorFn = require('css-color-function') | |
function applyFn(value, fn, frac) { | |
return colorFn.convert('color(' + value + ' ' + fn + '(' + frac + '))') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'carrierwave/processing/mini_magick' | |
class ImageUploader < CarrierWave::Uploader::Base | |
include CarrierWave::MiniMagick | |
IMAGE_EXTENSIONS = %w(jpg jpeg gif png) | |
DOCUMENT_EXTENSIONS = %w(exe pdf doc docm xls) | |
def store_dir | |
"files/#{model.id}" |
OlderNewer