Skip to content

Instantly share code, notes, and snippets.

View jcblw's full-sized avatar
💤
Don't wake me, my computer is sleeping in.

Jacob Lowe jcblw

💤
Don't wake me, my computer is sleeping in.
View GitHub Profile
@jcblw
jcblw / index.js
Created May 21, 2015 00:03
requirebin sketch
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
alert('hello william');
@jcblw
jcblw / svg2png.js
Last active December 14, 2015 14:05 — forked from gustavohenke/svg2png.js
var svg = document.querySelector( "svg" );
var svgData = new XMLSerializer().serializeToString( svg );
var canvas = document.createElement( "canvas" );
var ctx = canvas.getContext( "2d" );
var img = document.createElement( "img" );
img.setAttribute( "src", "data:image/svg+xml;base64," + btoa( svgData ) );
img.onload = function() {

Pastila todo

  • interactions

    • focus on editor/fields when menus are opened/closed
  • issues

    • title not updating on opening file
    • when removing a file that is currently open it should go back to the splash screen.
  • adding a new note description only gets the last char typed.

@jcblw
jcblw / index.js
Created April 18, 2015 22:04
requirebin sketch
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var dom = require('domla'),
append = document.body.appendChild.bind(document.body);
append(dom.div({class: 'foo-bar'},
dom.span('hello world')
));
@jcblw
jcblw / index.js
Last active August 29, 2015 14:19
requirebin sketch
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var dom = require('domla'),
append = document.body.appendChild.bind(document.body);
append(dom.div({class: 'foo-bar'},
dom.span('hello world')
));
@jcblw
jcblw / git-notes.md
Last active August 29, 2015 14:17
Git Notes

Git Notes

Sometimes there is things that you need to remember for development but there is no good way to remind you those things, without remember those places yourself.

├── branches
├── hooks
├── info
│   └── notes <
└── logs
@jcblw
jcblw / require.helper.md
Last active August 29, 2015 14:17
Helper Ideas

Require Helper

This helper will allow you to grab from cache sets of data. This helps decouple the need to do everything inside a view and allows data to be injected into the context while inside of the template. Eg.

{{require 'models/search'}} {{!-- outputs nothing --}}

{{#with search}}
	<div class="search-container">
		<input type="search" data-lat={{lat}} data-lng={{lng}} />
@jcblw
jcblw / filter.sh
Last active August 29, 2015 14:15
npm install cray-filters -g
cray-filters -f name-of-file.jpg -o output-file-name.png --filter spectrum
# this does not do the best with huge files
@jcblw
jcblw / index.js
Created February 6, 2015 07:33
requirebin sketch
var
domla = require( 'domla' ),
span = domla.span,
typeLock = require( 'type-lock' ),
obj = {
foo: 'bar'
};
typeLock( obj, true );
@jcblw
jcblw / index.js
Created February 2, 2015 16:55
requirebin sketch
var dom = require( 'domla' ),
div = dom.div,
ul = dom.ul,
li = dom.li,
h1 = dom.h1,
button = dom.button,
el;
// ^^ that will be so much better with destructuring
function addItem( ) {