Skip to content

Instantly share code, notes, and snippets.

@bernerbits
bernerbits / app.js
Last active July 8, 2016 19:37
In case you need to two-way bind unix timestamps in AngularJS
// AngularJS
// example usage: <input type="date" id="target" class="form-control" required x-date-millis="order.targetDate">
app.directive('input',
function($compile)
{
return {
restrict: 'E',
scope: {
dateMillis: '='
},
@bernerbits
bernerbits / gist:6815885
Last active December 24, 2015 14:49
Mandelbrot Set Plotter for Applesoft BASIC
1 REM Paste here to test: http://www.calormen.com/jsbasic/
10 REM Initial Setup
20 HGR2
30 CLRS% = 8: MULT% = 8: THR%=2048
40 WIDTH%=280:HEIGHT%=192
50 IX=-2:MX=1:IY=-1:MY=1
60 GOSUB 200
70 GET C$
80 TEXT
190 END