View .eslintrc.js
// $ cat .eslintrc.js
module.exports = {
'env': {
'browser': true,
'meteor': true,
'node': true,
'es6': true
},
'extends': 'eslint:recommended',
'parserOptions': {
View adb-screenshot.sh
./adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png
View about.md

procedural mesh generation

Generates an algorithmic 3D OBJ file with ThreeJS and Node.js.

# print to stdout
node generate-mesh.js > test.obj

# write to file
node generate-mesh.js test.obj
View modern-browser.js
const querySelectorAvailable = 'querySelector' in document;
const localStorageAvailable = 'localStorage' in window;
const eventListenerAvailable = 'addEventListener' in window;
if (querySelectorAvailable
&& localStorageAvailable
&& eventListenerAvailable) {
// Do your modern browser stuff
}
View Webpage Resource Priorization.md

Resource priorization (Chrome)

  1. HTML Higest priority
  2. Styles Higest priority, Stylesheet referenced with @import are also highest priority
  3. Images
  • Low priority, if outside the viewport
  • Upgraded to medium priority, when they should be rendered in the visible viewport
  1. Ajax/XHR/fetch() High priority
  2. Scripts
  • <script></script> High, when appearing in the markup before and image
  • <script></script> Medium, when appearing in the markup after an image
View javascript.el
;;; javascript-web.el --- Javascript & co. setup
;;; Commentary:
;; Setup web development tools
;;; Code:
;;; --- Javascript
(use-package indium
:ensure t
:config
(eval-when-compile
View colorlog.js
// -- You can use %c to CSS style your output
console.log('%cPrint styled text to the console!', 'font-size: 50px; background: red;');
// -- Use table() function to layout more complex data
const persons = [
{ name: 'Paul',
city: 'Heidelberg',
age: 35,
job: 'Photographer'
},
View esh-custom.el
(require 'dash)
(require 's)
(defmacro with-face (STR &rest PROPS)
"Return STR propertized with PROPS."
`(propertize ,STR 'face (list ,@PROPS)))
(defmacro esh-section (NAME ICON FORM &rest PROPS)
"Build eshell section NAME with ICON prepended to evaled FORM with PROPS."
`(setq ,NAME
View vortex-poker-3.md

Vortex Poker 3 Cheetsheet

Lighting

  • MENU + 4 - Cycle through key light reaction effects:
    1. Key flash white
    2. Key flash RGB
    3. Keyboard flash white
    4. Keyboard flash RGB

Programming

View comupteVertexNormal.glsl
mat3 getTangentBasis( in vec3 tangent_y )
{
vec3 UpVector = vec3(0,1,0);
vec3 tangent_x = normalize( cross( UpVector, tangent_y ) );
vec3 tangent_z = cross( tangent_y, tangent_x );
return mat3( tangent_x, tangent_y, tangent_z );
}
vec3 applyDeformation( in vec3 pos, in vec3 norm )
{