A Pen by Alexandre Laurent on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('myapp.image', [ ]) | |
.factory('Image', function ($http) { | |
function blobFromDataURI(dataURI) { | |
var raw = window.atob(dataURI.replace(/[^,]+,/, '')), | |
imgBuffer = []; | |
for (var i = 0, len = raw.length; i < len; i++) { | |
imgBuffer.push(raw.charCodeAt(i)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun tmux-command (dir) | |
(shell-command-to-string | |
(concat "tmux select-pane -" dir))) | |
(defun last-window-send-tmux (dir tmuxdir) | |
(let ((other-window (windmove-find-other-window 'right))) | |
(cond ((null other-window) | |
(tmux-command tmuxdir)) | |
((and (window-minibuffer-p other-window) | |
(not (minibuffer-window-active-p other-window))) |
A Pen by Alexandre Laurent on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var browserify = require('browserify'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); | |
var uglify = require('gulp-uglify'); | |
var rename = require('gulp-rename'); | |
var NAMESPACE = 'myapp.mymodulename'; | |
gulp.task('default', function () { |