Skip to content

Instantly share code, notes, and snippets.

@karlin
karlin / uxn.sh
Created November 20, 2022 06:29
Uxn on Alpine Linux
# fetch and compile uxn for Alpine, e.g. iSH on iOS
apk add gcc libc-dev git
git clone https://git.sr.ht/~rabbits/uxn
cd uxn
gcc src/uxnasm.c -o bin/uxnasm -L/usr/local/lib --std=c89
gcc src/uxn.c src/devices/system.c src/devices/file.c src/devices/datetime.c src/uxncli.c -o bin/uxncli -L/usr/local/lib --std=c89
bin/uxnasm projects/examples/devices/console.tal bin/console.rom
bin/uxncli bin/console.rom
@karlin
karlin / machine.js
Last active January 29, 2020 03:01
Generated by XState Viz: https://xstate.js.org/viz
// Goal: https://github.com/karlin/One_Button_Alarmduino/blob/master/One_Button_Alarmduino.ino
// Ref: https://xstate.js.org/docs/guides/activities.html
// Visualizer: https://xstate.js.org/viz/?gist=60570390017425aa339f8122dac22267
function createBeepingActivity(context, activity) {
// Start the beeping activity
const interval = setInterval(() => {
console.log('BEEP!');
}, context.intervalSeconds*1000);
@karlin
karlin / Processes and Attributes of Highly Effective Teams.md
Created July 30, 2015 20:38
Processes and Attributes of Highly Effective Teams

Processes and Attributes of Highly Effective Teams

by Mandy Balsom, Roderick Barrass, John Michela, Agnes Zdaniuk

Overarching Attributes of Effective Teams

Mission and Goals: High performing teams have a clear mission and/or goals. The organization's mission describes its overall direction and general goals for accomplishing the mission. These broad goals must then be narrowed down into more specific tasks. It is these more specific goals that the team will be working towards. For example, while an organization's mission may call for the development of five new products within a ten year span, a more specific goal for a team to work towards would be the completion of one product within a time frame of two years.

@karlin
karlin / _.md
Created April 16, 2014 17:01
movable point on circle
@karlin
karlin / _.md
Created April 16, 2014 16:58
Triangulo 01
@karlin
karlin / in_house_dist_server.py
Created December 17, 2013 05:39
A simple script to create a web server in the current directory that allows iOS devices to install apps for in-house distribution. Invoke with a port and IP, like `python in_house_dist_server.py 8000 192.168.1.2`
import SimpleHTTPServer, BaseHTTPServer, sys
class InHouseRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map['.plist'] = 'text/xml'
def do_GET(self):
if self.path == "/index.html":
self.wfile.write('<p><a href="itms-services://?action=download-manifest&url=http://'+sys.argv[2]+':'+sys.argv[1]+'/manifest.plist">Install App</a></p>')
self.send_response(200)
return
SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
BaseHTTPServer.test(InHouseRequestHandler, BaseHTTPServer.HTTPServer)
@karlin
karlin / _.md
Created September 24, 2013 17:17
the dog next door won't be quiet
@karlin
karlin / date_field.coffee
Created April 24, 2013 05:22
A DateField view for Ember.js that uses Modernizr to detect HTML 5 date input support and falls back to a simple text field if that's not available. Also uses Moment.js instead of Date for formatting and binding. Otherwise a clone of http://discuss.emberjs.com/t/example-building-a-date-input-field/674/6
# Usage:
# {{App.DateField dateBinding="date"}} # Where "date" points to a Moment.js object
App.DateField = Ember.TextField.extend
type: 'date'
hasFocus: false
placeholderBinding: 'dateFormat'
dateFormat:(->
if Modernizr.inputtypes.date then 'YYYY-MM-DD' else 'MM/DD/YYYY'
).property()
@karlin
karlin / index.html
Created February 15, 2013 22:10
A CodePen by Karlin Fox. kpi - bullet graph of some key performance metrics
<div style="float:right">
<input id="metric" value="week_billable"/>
<input id="h" type="range" min="0" max="120"/>
</div>
<div class="header"></div>
@karlin
karlin / config.json
Created December 18, 2012 21:31
Another Inlet
{"description":"Another Inlet","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"tab":"edit","display_percent":0.35552325581395344,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"hidepanel":false}