Skip to content

Instantly share code, notes, and snippets.

View kristoferjoseph's full-sized avatar
🐘
💨

kj kristoferjoseph

🐘
💨
View GitHub Profile
1. Design Your Own
If you are willing / able to learn some 3D design skills, that might be the most flexible
option. With a design and a 3D printer, you can design pretty much any kind of enclosure
you can imagine and modify it as your project evolves.
Here's a good tutorial about designing enclosures from Ben Heck:
https://www.youtube.com/watch?v=03Ju_LJlU3U

Screencapture and animated gifs

I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).

Capturing (Easy)

  1. Launch quicktime player
  2. do Screen recording

screen shot 2014-10-22 at 11 16 23 am

@yyx990803
yyx990803 / vue-element.html
Last active October 15, 2017 11:50
Vue custom element draft
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Vue.js custom element example</title>
<script src="../dist/vue.js"></script>
</head>
<body>
<my-element msg="custom message">original content</my-element>
<script>
@REAS
REAS / WaveWorm.pde
Last active September 27, 2020 15:30
Rainbow software simulation of mechanical sine wave machine, written at the Exploratorium
// I think there's a bug in here
float magnitude = 0;
float baseAngle = 0;
int lineSpacer = 4;
int yOffset = 80;
float cx;
float cy;
float newcx;
@yocontra
yocontra / gulpfile.js
Last active January 1, 2016 00:29
gulpfile for a simple livereload static web server. this is a proof of concept that uses no plugins to do the work. obviously there are plugins that eliminate almost all of this code but i thought it would be a fun demonstration. this will trigger livereload any time any file is modified in the current working directory. it also serves the curre…
var gulp = require('gulp');
var gutil = require('gulp-util');
var express = require('express');
var path = require('path');
var tinylr = require('tiny-lr');
var createServers = function(port, lrport) {
var lr = tinylr();
lr.listen(lrport, function() {
gutil.log('LR Listening on', lrport);
@conradz
conradz / gist:7686821
Created November 28, 2013 03:21
rework-npm

rework-npm

I recently published rework-npm that allows you to import CSS files using the same rules that the Node.js uses for modules. This lets you install and manage CSS packages using npm the same way you manage JS modules.

Why npm?

First of all, why use npm? Why does it make sense to use npm for CSS? Npm is good for a number of reasons.

First, it is simple to use. Want to publish a module? Just use npm publish. Want to install a new package and save it to the dependencies? Just use npm install --save mymodule. This makes it super easy to create and maintain small modules, instead of putting everything into one large module.

@Stuk
Stuk / promise-debug.js
Last active October 2, 2016 21:39
I've found this code useful for debugging promises, to find what order things are happening in. `console.error` gives a stack trace in the Webkit Developer Tools which makes easily narrow down where the promise creation and resolution is happening.
var Q = require("q");
var Set = require("collections/set"); // https://npmjs.org/package/collections
window.outstandingPromises = new Set();
var originalDefer = Q.defer;
Q.defer = function () {
console.error("Deferred created");
var deferred = originalDefer();
deferred.stack = new Error("").stack;
window.outstandingPromises.add(deferred);
@kristoferjoseph
kristoferjoseph / .vimrc
Created April 2, 2013 16:57
Copy of my hand tuned .vimrc file
"PATHOGEN
execute pathogen#infect()
call pathogen#helptags()
call pathogen#runtime_append_all_bundles()
"RELOAD VIMRC
nmap <silent> <leader>sv :so $MYVIMRC<CR>
nmap <silent> <leader>ev :e $MYVIMRC<CR>
"LEADER
/* normal flexbox */
.flexbox .flex-container {
display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: flex;
}
.flexbox .flex-container.vertical {
display: -webkit-flex;
display: -moz-flex;
@max-mapper
max-mapper / bundle.js
Created November 8, 2012 19:03
ratchet color schemer
var require = function (file, cwd) {
var resolved = require.resolve(file, cwd || '/');
var mod = require.modules[resolved];
if (!mod) throw new Error(
'Failed to resolve module ' + file + ', tried ' + resolved
);
var cached = require.cache[resolved];
var res = cached? cached.exports : mod();
return res;
};