Skip to content

Instantly share code, notes, and snippets.

lancelotj / index.js
Created Apr 19, 2018 — forked from just-boris/index.js
Gulp wrap pipe
View index.js
* Wrap gulp streams into fail-safe function for better error reporting
* Usage:
* gulp.task('less', wrapPipe(function(success, error) {
* return gulp.src('less/*.less')
* .pipe(less().on('error', error))
* .pipe(gulp.dest('app/css'));
* }));
lancelotj /
Created Mar 23, 2012
Simple REST Framework for Django
# -*- coding: utf-8 -*-
from django.core import serializers
from django.http import HttpResponse
from django.utils import simplejson as json
from django.views.generic import View
from django.views.generic.edit import ModelFormMixin, BaseUpdateView, FormMixin, TemplateResponseMixin
class JsonResponseMixin(object):
lancelotj / gist:910459
Created Apr 8, 2011
Create a short unique id within range of number, alphabet, - and _ from uuid
View gist:910459
import base64, uuid
base64.b64encode(uuid.uuid4().bytes, '_-')[:22]
You can’t perform that action at this time.