Skip to content

Instantly share code, notes, and snippets.

@robbintt
robbintt / gulpfile.js
Last active April 5, 2019 07:20 — forked from gabrielhpugliese/gulpfile.js
Django collectstatic + Gulp watch
var gulp = require('gulp');
// Run shell commands with exec:
// https://www.npmjs.com/package/gulp-exec
var exec = require('child_process').exec;
// collectstatic task for Django
// https://www.npmjs.com/package/gulp-exec
gulp.task('collectstatic', function (cb) {
exec('python ../../manage.py collectstatic -i node_modules -i bower_components --noinput', function (err, stdout, stderr) {
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active June 2, 2024 11:23
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@sanderhahn
sanderhahn / gulpfile.js
Last active September 11, 2019 14:45
Minify and templateCache your Angular Templates using Gulp
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
var templates = require('gulp-angular-templatecache');
var minifyHTML = require('gulp-minify-html');
// Minify and templateCache your Angular Templates
// Add a 'templates' module dependency to your app:
// var app = angular.module('appname', [ ... , 'templates']);