Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@shuntksh
shuntksh / file0.js
Last active March 31, 2017 13:49
WebpackってCSS周りのLoaderがいっぱいあって分かりにくいので整理してみる ref: http://qiita.com/shuntksh/items/bb5cbea40a343e2e791a
{
test: /\.css$/,
loader: "style-loader!css-loader?modules&importLoaders=1&camelCase!postcss-loader",
},
@peter
peter / carrierwave-file-size-limit-example.rb
Created March 7, 2014 09:17
Checking and Limiting File Size of Uploaded Files with Carrierwave
# NOTE: There must be a better way to do this - help appreciated!
###############################################################
# uploaded_file.rb - utility class
###############################################################
class UploadedFile
def self.size(file)
uploaded?(file) ? file.size : nil
end