Skip to content

Instantly share code, notes, and snippets.

@saddieeiddas
saddieeiddas / npm-scipts-platform.json
Created February 29, 2016 01:14
detect windows/nix during npm scripts
{
"name": "node-scripts",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"is-windows": "node -e \"process.exit(process.platform === 'win32' ? 0 : 1);\"",
"is-nix": "node -e \"process.exit(process.platform !== 'win32' ? 0 : 1);\"",
"say-hello": "npm run is-nix --loglevel=silent && echo HELLO NIX || echo HELLO WINDOWS"
},
@saddieeiddas
saddieeiddas / Vagrantfile
Created January 24, 2016 23:17
Vagrant ScotchBox
# -*- mode: ruby -*-
# vi: set ft=ruby :
# config_ip = "192.168.33.10"
config_hostname = "scotch.local"
config_host_aliases = %w(sub1.scotch.local sub2.scotch.local)
config_ssl_hostname = config_hostname
# config_network_type = "private_network"
config_network_type = "public_network"
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/// <reference path="../tsd/tsd.d.ts" />
import {events} from 'camelot-unchained';
import * as React from 'react';
var perfhudRaw = '<div style="background-color:rgba(127,127,127,0.66); padding:15px; border:0px; border-radius:15px; display:block; margin-top:10px; margin-right:10px; margin-left:auto; margin-bottom:auto; width:300px"><div style="width:100%; margin:0px; border:0px; color:white; font-size:300%; text-align:right">60 fps</div><br/><div style="padding:0px; border:0px; display:block; margin:0px; white-space:nowrap; width:100%"><div>average frame time: 16.7<small>ms</small></div><div style="padding:1px; border-color:white; border:1px solid; display:block; margin:0px; white-space:nowrap; width:100%"><div style="padding:0px; border:0px; display:inline-block; margin:0px; vertical-align:top; white-space:nowrap; width:11.174%"><div title="Run: 1.9ms" style="background-color:#ffffff; padding:0px; border:0px; display:inline-block; margin:0px; width:100.000%; min-height:12px"></div><br/><div style="padding:0px; border:0px; display:inline-block; margin:0px; vertical-align:top; white-space:nowrap; width:0.070%"><div title="
@saddieeiddas
saddieeiddas / gulpfile.js
Created December 3, 2015 22:38
Rollup Test
var gulp = require('gulp');
var runSequence = require('run-sequence');
var plugins = require('gulp-load-plugins')({
pattern: [
'gulp-*',
'gulp.*',
'rollup-plugin-npm',
'rollup-plugin-commonjs',
'rollup-plugin-babel'
]
@saddieeiddas
saddieeiddas / VfxStats.js
Created September 7, 2015 09:55
CU perfHUD Parser
var vfx = new VfxStats(document.getElementById('raw').innerHTML);
console.log(vfx);
function VfxStats(rawHtml) {
var vfxRawHtml = new DOMParser().parseFromString(rawHtml, 'text/html').children[0].children[1];
var self = this;
buildVfxStats(vfxRawHtml);
@saddieeiddas
saddieeiddas / cu-build-config.md
Last active August 29, 2015 14:27
Configuration for CU Build

type

This can be set to:

  • library
  • component
  • multi

It will determine how the build is treated (also sets up engine below, if it is not configured)

@saddieeiddas
saddieeiddas / CU-LIB.md
Created August 13, 2015 17:53
CU Lib Working With Popouts

CU-LIB Working With Popouts

I have done some debugging on getting components to work in external popouts. It is possible but will require some tweaking for the cu-lib module.

What is a Popout

A popout is where a UI component opens itself in a new window.