List of incompetent jackasses who can't check a source if their lives depended on it:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {Rx} from "@cycle/core"; | |
| import {h} from '@cycle/dom'; | |
| import Validator from "../form-validator"; | |
| import cuid from "cuid"; | |
| let formValidator = new Validator({ | |
| name: /^\S+/, | |
| lastname:/^\S+/, | |
| email:/^\S+@\S+\.\S+/ | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| /** | |
| * Created by Milan Karunarathne | |
| * Email: mhkarunarathne@gmail.com | |
| * May be freely distributed under the MIT license | |
| */ | |
| import EventEmitter from 'events'; | |
| class Single extends EventEmitter { |
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function setUserAgent(window, userAgent) { | |
| // Works on Firefox, Chrome, Opera and IE9+ | |
| if (navigator.__defineGetter__) { | |
| navigator.__defineGetter__('userAgent', function () { | |
| return userAgent; | |
| }); | |
| } else if (Object.defineProperty) { | |
| Object.defineProperty(navigator, 'userAgent', { | |
| get: function () { | |
| return userAgent; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| attribute vec3 position; | |
| uniform mat4 modelViewMatrix; | |
| uniform mat4 modelMatrix; | |
| uniform mat4 projectionMatrix; | |
| uniform float scale; | |
| uniform float size; | |
| uniform float aspect; | |
| varying vec2 vUv; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var cameraZ = camera.position.z; | |
| var planeZ = 5; | |
| var distance = cameraZ - planeZ; | |
| var aspect = viewWidth / viewHeight; | |
| var vFov = camera.fov * Math.PI / 180; | |
| var planeHeightAtDistance = 2 * Math.tan(vFov / 2) * distance; | |
| var planeWidthAtDistance = planeHeightAtDistance * aspect; | |
| // or |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Implementation of perlin noise, ported from https://gist.github.com/Flafla2/f0260a861be0ebdeef76 to js. | |
| var repeat = -1; | |
| var setRepeat = function(repeat) { | |
| this.repeat = repeat; | |
| }; | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .container { | |
| background: url('path/to/background.jpg'); | |
| background-size: cover; | |
| background-repeat: no-repeat; | |
| position: relative; /* use this if optional inner container is used */ | |
| } | |
| .container:after { | |
| background-image: linear-gradient(45deg, #666 25%, transparent 25%), | |
| linear-gradient(-45deg, #666 25%, transparent 25%), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Shader "Unlit/StereographicProjectionBubble" | |
| { | |
| Properties | |
| { | |
| _MainTex ("Texture", 2D) = "white" {} | |
| _PanSpeed ("Pan Speed", Float) = 0.1 | |
| _Spherify ("Spherify", Range(0,1)) = 1 | |
| } | |
| SubShader | |
| { |