Skip to content

Instantly share code, notes, and snippets.

View rlindgren's full-sized avatar

Ryan Lindgren rlindgren

View GitHub Profile
@rlindgren
rlindgren / .block
Last active May 4, 2018 17:31
Activity Chart
license: gpl-3.0
border: no
@rlindgren
rlindgren / storage.js
Last active May 3, 2019 14:04
Nedb storage adapter for use with the cordova-file-plugin. Drop in replacement for the browser-version. To install pre-built Nedb for use with cordova-file-plugin, see here: https://github.com/rlindgren/nedb-cordova-file
/**
* Way data is stored for this database
* For a Node.js/Node Webkit database it's the file system
* For a browser-side database it's the device file system, exposed via the `cordova-file` plugin
*
* This version is the browser version
*/
var storage = {};
@rlindgren
rlindgren / kExpandingTextarea
Last active August 29, 2015 14:08
auto-expanding textarea angular directive. possibly the simplest implementation of this behavior for modern browsers.
angular.module('kExpandingTextarea', [])
.directive('kAutoExpandTextarea', function () {
return {
restrict: 'A',
require: 'ngModel',
link: function (scope, el, attrs, ctrls) {
if (!(/textarea/i.test(el[0].tagName))) return;
var handler = function handler (e) {
var gulp = require('gulp'),
sass = require('gulp-sass'),
browserify = require('gulp-browserify'),
concat = require('gulp-concat'),
embedlr = require('gulp-embedlr'),
refresh = require('gulp-livereload'),
lrserver = require('tiny-lr')(),
express = require('express'),
livereload = require('connect-livereload')
livereloadport = 35729,