This file contains hidden or 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
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 + ')'; | |
}); |
This file contains hidden or 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
module ApplicationHelper | |
def render_with_context(path_to_partial, locals = {}, &block) | |
render({ layout: path_to_partial, locals: locals }, &block) | |
end | |
end |
This file contains hidden or 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
cp /System/Library/CoreServices/DefaultDesktop.jpg ~/Desktop/Wallpaper.jpg && gzip -9 $_ |
This file contains hidden or 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
.fixed { | |
position: fixed; | |
top: 20px; | |
} | |
/* The same for IE6: */ | |
.fixed { | |
position: absolute; | |
top: expression( |