Skip to content

Instantly share code, notes, and snippets.

View tomsarduy's full-sized avatar

Tom Sarduy tomsarduy

View GitHub Profile
_ = require('lodash');
/**
* Parse Query from Express req format to oDATA
* Parameters supported: $filter, $select, $orderby, $top, $skip
* Change the application status of the application
* @param req.query
* @return object
*/
// generated on 2015-11-05 using generator-gulp-webapp 1.0.3
import gulp from 'gulp';
import gulpLoadPlugins from 'gulp-load-plugins';
import browserSync from 'browser-sync';
import del from 'del';
import {stream as wiredep} from 'wiredep';
const $ = gulpLoadPlugins();
const reload = browserSync.reload;
@tomsarduy
tomsarduy / SVG background image with fallback to PNG
Last active September 21, 2016 20:22
SVG background image with fallback to PNG via jQuery and CSS, with Modernizr library.
Via jQuery:
if (!Modernizr.svg) {
$("#logo").css("background-image", "url(fallback.png)");
}
Via CSS:
#logo {
background: url(logo.svg); //svg by default