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
| entry: { | |
| app: [ | |
| 'webpack-dev-server/client?http://localhost:8080', | |
| 'webpack/hot/only-dev-server', | |
| './app/main.js' | |
| ], | |
| vendor: './app/vendor/vendor.js', | |
| editor: './app/vendor/editor.js' | |
| }, | |
| ... |
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
| connectToStores() { | |
| let view = arguments[ 0 ]; | |
| let connectedView = connectToStores.apply( null, arguments ); | |
| connectedView.willTransitionTo = view.willTransitionTo; | |
| _.extend( connectedView.contextTypes, view.contextTypes ); | |
| return connectedView; |
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
| precision highp float; | |
| precision highp int; | |
| #define VERTEX_TEXTURES | |
| #define GAMMA_FACTOR 2 | |
| #define MAX_DIR_LIGHTS 0 | |
| #define MAX_POINT_LIGHTS 0 | |
| #define MAX_SPOT_LIGHTS 0 |
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
| precision highp float; | |
| precision highp int; | |
| #define MAX_DIR_LIGHTS 0 | |
| #define MAX_POINT_LIGHTS 0 | |
| #define MAX_SPOT_LIGHTS 0 | |
| #define MAX_HEMI_LIGHTS 0 | |
| #define MAX_SHADOWS 0 |
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
| let conflicts = _.chain( shaders ).reduce( ( memo, shader ) => { | |
| return memo.concat( | |
| shader.runtime.metadata.fragment.variables, | |
| shader.runtime.metadata.vertex.variables | |
| ); | |
| }, [] ).countBy().reduce( ( memo, countGroup, name ) => { | |
| if( countGroup > 1 ) { | |
| memo.push( name ); | |
| } | |
| return memo; |
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
| doSomething().then( ( id ) => { | |
| return delete(id).then(() => { | |
| return id; | |
| }); | |
| }).then((id) => { | |
| return doSomethingElseWithId(id); | |
| }); |
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
| COLOR_LIGHT_RED=$(tput sgr0 && tput bold && tput setaf 1) | |
| COLOR_LIGHT_CYAN=$(tput sgr0 && tput bold && tput setaf 6) | |
| COLOR_RESET=$(tput sgr0) | |
| say -v ? | while read line; do | |
| voice=`echo $line | awk '{ print $1 }'` | |
| phrase=`echo $line | sed -E 's/^.+# //'` | |
| echo "${COLOR_LIGHT_RED}say -v ${COLOR_LIGHT_CYAN}${voice}${COLOR_RESET} $phrase" | |
| say -v $voice $phrase | |
| done |
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
| /** | |
| * Reasons to avoid comma separated lists in Javascript | |
| * ---------------------------------------------------- | |
| * TL;DR use: | |
| * | |
| * var a = 1; | |
| * var b = 2; | |
| * | |
| * instead of: | |
| * |
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 1 | |
| uniform float a; | |
| void main() { | |
| float b; | |
| gl_FragColor = a + b; | |
| } | |
| // Shader 2 | |
| uniform float b; | |
| void main() { |
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
| it('variables in main child scope (like for loop) that conflict get renamed correctly ', function() { | |
| var combined = newComposedShader( | |
| newSubShader({ | |
| fragment: ` | |
| void main() { | |
| vec2 position = vec2( 1.0 ); | |
| for (int p = 0; p < 20; p++) { | |
| vec2 other = position + p; | |
| } |