Skip to content

Instantly share code, notes, and snippets.

View flftfqwxf's full-sized avatar

skypp flftfqwxf

View GitHub Profile
@alexey-sh
alexey-sh / gist:cff195650274c6e021a1
Created February 14, 2015 23:32
gulp ejs precompile
var ejs = require('gulp-ejs-precompiler');
var concat = require('gulp-concat');
var gulp = require('gulp');
var insert = require('gulp-insert');
gulp.task('default', function() {
return gulp.src("./app/templates/*.ejs")
.pipe(ejs({
compileDebug: true,
@cakebaker
cakebaker / gist:823574
Created February 12, 2011 07:11
Nicer interface for removing query string params with Node.js
var urlLib = require('url');
function UrlAdapter(urlString) {
this.urlObj = urlLib.parse(urlString, true);
// XXX remove the search property to force format() to use the query object when transforming the url object to a string
delete this.urlObj.search;
}
exports.UrlAdapter = UrlAdapter;