Skip to content

Instantly share code, notes, and snippets.

View shaoner's full-sized avatar
🐱

Alex Laurent shaoner

🐱
View GitHub Profile
@shaoner
shaoner / gulpfile.js
Created August 26, 2015 13:49
Gulp script to make simple node modules work in the browser
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 () {
@shaoner
shaoner / Select spinning wheel with ionic.markdown
Created September 12, 2015 21:57
Select spinning wheel with ionic
@shaoner
shaoner / emacs.el
Last active October 6, 2015 09:24
emacs tmux navigator
(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)))
@shaoner
shaoner / image.service.js
Last active October 13, 2015 12:01
Ionic upload from base64 encoded image
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));
}
@shaoner
shaoner / Ionic Multiple Range.markdown
Created April 21, 2016 19:19
Ionic Multiple Range