View gulpfile.js
var Data = require('datauri');
var path = require('path');
var inlineAssets = function(content) {
var directory = path.dirname(content.source.input.file);
content.replaceValues(/data-url\("(.*)"\)/, 'data-url(', function(value, match) {
var image = new Data(path.join(directory, match));
return 'url(' + image.content + ')';
});
View application_helper.rb
module ApplicationHelper
def render_with_context(path_to_partial, locals = {}, &block)
render({ layout: path_to_partial, locals: locals }, &block)
end
end
View wallpaper.sh
cp /System/Library/CoreServices/DefaultDesktop.jpg ~/Desktop/Wallpaper.jpg && gzip -9 $_
View good-old-times.css
.fixed {
position: fixed;
top: 20px;
}
/* The same for IE6: */
.fixed {
position: absolute;
top: expression(