Skip to content

Instantly share code, notes, and snippets.

@tbfleming
tbfleming / additional.svg
Last active August 29, 2015 14:03
Example jscut config
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tbfleming
tbfleming / motor_plate.jscut
Created June 30, 2014 17:34
motor plate testing
{"svg":{"pxPerInch":"90"},"material":{"units":"inch","thickness":"1.0","zOrigin":"Top","clearance":"0.1"},"curveToLineConversion":{"minNumSegments":"1","minSegmentLength":"0.01"},"tool":{"units":"inch","diameter":".125","passDepth":0.125,"overlap":0.6,"rapidRate":100,"plungeRate":20,"cutRate":40},"operations":{"operations":[{"rawPaths":[{"path":[["M",10.625,849.875],["L",10.59375,849.90625],["L",10.08053910949707,849.9261194946289],["L",9.567066699414063,849.9703042382812],["L",9.054714924389648,850.0384948706055],["L",8.5448659390625,850.13038203125],["L",8.038901898071288,850.2456563598632],["L",7.538204956054688,850.3840084960937],["L",7.044157267651368,850.5451290795899],["L",6.5581409875,850.72870875],["L",6.081538270239258,850.9344381469726],["L",5.615731270507813,851.1620079101563],["L",5.162102142944336,851.4111086791992],["L",4.722033042187499,851.68143109375],["L",4.296906122875977,851.972665793457],["L",3.8881035396484376,852.2845034179687],["L",3.4970074471435546,852.6166346069335],["L",3.125,852.
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../paper-checkbox/paper-checkbox.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/iconsets/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<link rel="import" href="../paper-icon-button/paper-icon-button.html">
<link rel="import" href="../paper-item/paper-item.html">
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../core-pages/core-pages.html">
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@tbfleming
tbfleming / index.js
Last active August 29, 2015 14:24
requirebin sketch
var h = require('virtual-dom/h');
var diff = require('virtual-dom/diff');
var patch = require('virtual-dom/patch');
var createElement = require('virtual-dom/create-element');
var mainLoop = require("main-loop");
var rx = require('rx');
// Create scroll state from members. Calculates range of visible items.
function createScrollState(itemSize, viewSize, numItems, scrollPos) {
'use strict';
@tbfleming
tbfleming / main.cpp
Created January 13, 2018 02:08
cib demo: emscripten_async_call
// Run this multiple times for multiple counters.
// Use the reboot button to stop them all.
#include <emscripten.h>
#include <stdio.h>
int counter = 0;
void timer(void *) {
printf("counter %p: %03d\n", &counter, counter++);
@tbfleming
tbfleming / main.cpp
Created January 13, 2018 02:48
cib demo: emscripten_async_wget_data
// Download a file using https. Only works with sites which support CORS.
#include <emscripten.h>
#include <stdio.h>
#include <string>
using namespace std;
void received(void *, void *data, int size) {
puts(string((char *)data, size).c_str());
}
@tbfleming
tbfleming / main.cpp
Created January 13, 2018 02:57
cib demo: emscripten_run_script
// Run javascript
// Use Reboot to stop
#include <emscripten.h>
#include <stdio.h>
using namespace std;
auto script = R"(
Module.print('Hello from javascript!\n');
@tbfleming
tbfleming / main.cpp
Last active January 14, 2018 14:33
cib demo: Range v3 comprehensions example
// Range v3 library
//
// Copyright Eric Niebler 2013-present
//
// Use, modification and distribution is subject to the
// Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// Project home: https://github.com/ericniebler/range-v3