Skip to content

Instantly share code, notes, and snippets.

@glued
glued / gist:f7b2def1c4edd48dce44
Created February 16, 2015 05:40
Intel Galileo Notes ( outdated )

Intel Galileo Notes 12.13.2013

###1. Load distro onto MicroSD card The default linux distro from Intel is missing GCC / make which is required by many NPM modules but... A guy from intel has a [Nice Tutorial][1] which adds the dev tools to the Yocto distro or [download his custom image][2]

###2. SSH into your galileo ssh root@someaddress

@glued
glued / raf.js
Created July 4, 2015 06:22
ES2015 requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
/*
to use just create a file raf.js
import './utils/raf';
*/
@glued
glued / Threejs_maya
Last active August 29, 2015 14:24
Modified THREEJS Maya plugin
__author__ = 'Sean Griffin'
__version__ = '1.0.0'
__email__ = 'sean@thoughtbot.com'
import sys
import os.path
import json
import shutil
@glued
glued / ThreejsExportScript.mel
Last active August 29, 2015 14:25
Maya exporter mel script modified because it doesnt save settings
// ThreeJsExportScript.mel
// Author: Sean Griffin
// Email: sean@thoughtbot.com
global proc int ThreeJsExportScript(string $parent, string $action, string $settings, string $callback)
{
if ($action == "post")
{
setParent $parent;
columnLayout -adj true;
{
"presets": ["es2015", "stage-0"]
}
@glued
glued / deep-copy-decorator.ts
Created March 8, 2019 05:11
Deep Copy Decorator
function DeepCopy() {
return function(target: any, key: string) {
let value = target[key];
return Object.defineProperty(target, key, {
configurable: true,
get: () => value,
set: val => {
value = JSON.parse(JSON.stringify(val));
},
});
@glued
glued / theme.js
Last active October 8, 2019 19:31
Check for OS Dark Theme in the browser
const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
@glued
glued / deno.ts
Created May 13, 2020 05:12
denoland
console.log("Welcome to Deno 🦕");
@glued
glued / deno.ts
Last active May 13, 2020 05:21
denoland
console.log("Welcome to Denos5 🦕");
const data = ['foo', 'bar', 'baz'];
const data2 = {
foo: {
bar: 123,
baz: [
{ title: 'foo', value: 'bar' },
{ title: 'a', value: 'a' },
{ title: 'b', value: 'b' },
],