Skip to content

Instantly share code, notes, and snippets.

View foobartel's full-sized avatar

Holger Bartel foobartel

View GitHub Profile

Keybase proof

I hereby claim:

  • I am foobartel on github.
  • I am foobartel (https://keybase.io/foobartel) on keybase.
  • I have a public key whose fingerprint is 203E FDA8 9E19 D8B9 4949 FA0A 1B6D A7D9 3592 8F89

To claim this, I am signing this object:

@foobartel
foobartel / svg-fallback
Created October 16, 2014 04:17
Simple SVG Fallback
<!-- The simplest way to have PNG fallback for browsers without SVG support:
hattip by @viljamis -->
<img src="logo.svg" onerror="this.onerror=null;this.src='logo.png'">
@foobartel
foobartel / string-replace-css-url
Created October 15, 2014 03:06
Grunt string-replace CSS url to rails asset
// string-replace in two passes, because of bug?, reason is apparently related to lodash template security
// find: ": url(img/imagename)"
//replace: "url(<%= asset_path 'img/imagename' %>)"
'string-replace': {
inline: {
files: {
'dist/css/app.css.erb': ['css/app.css'],
},
options: {