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
| SELECT "posts".*, | |
| Group_concat(tags.id, "↕") AS keyword_ids, | |
| Group_concat(tags.NAME, "↕") AS keyword_names, | |
| Group_concat(Ifnull(tags.description, "null"), "↕") AS keyword_descriptions, | |
| FROM "posts" | |
| LEFT JOIN "post_tags" | |
| ON "post_tags"."post_id" = "posts"."id" | |
| LEFT JOIN "tags" | |
| ON "post_tags"."keyword_id" = "tags"."id" | |
| WHERE "tags"."name" IN ( 'sometag' ) |
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
| // Loop over every module, which looks like | |
| // { | |
| // id: 1, reasons: [{ moduleId: 3 }] | |
| // id: 2, reasons: [{ moduleId: 3 }] | |
| // id: 3, reasons: [] | |
| // } | |
| // and invert it to | |
| // { | |
| // 3: { dependencies: [ 1, 2 ] } | |
| // } |
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
| localA = current_mesh.matrix_world.inverted() * Vector( ( 0, 0, 10 ) ) | |
| localB = current_mesh.matrix_world.inverted() * Vector( ( 0, 0, 0 ) ) | |
| current_mesh.ray_cast( localA, localB ) |
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 bpy | |
| ops = bpy.ops | |
| scene = bpy.context.scene | |
| mesh = bpy.ops.mesh | |
| # Delete default scene objects | |
| ops.object.select_all() | |
| ops.object.select_all() | |
| ops.object.delete() |
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 computeFaceCentroids( geometry ) { | |
| var f, fl, face; | |
| for ( f = 0, fl = geometry.faces.length; f < fl; f ++ ) { | |
| face = geometry.faces[ f ]; | |
| face.centroid = new THREE.Vector3( 0, 0, 0 ); | |
| if ( face instanceof THREE.Face3 ) { |
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
| const react3 = <React3 | |
| ref="renderer" | |
| mainCamera="camera" | |
| width={ gameWidth } | |
| height={ gameHeight } | |
| onRendererUpdated={ this._onRenderUpdate } | |
| antialias | |
| > | |
| <module |
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 React, { Component } from 'react'; | |
| import THREE from 'three'; | |
| export default class Wall extends Component { | |
| shouldComponentUpdate( nextProps ) { | |
| return ( nextProps.position !== this.props.position ) || | |
| ( nextProps.rotation !== this.props.rotation ) || | |
| ( nextProps.quaternion !== this.props.quaternion ) || |
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
| <script dangerouslySetInnerHTML={{ | |
| __html: 'var appData = ' + JSON.stringify( this.props.appData ).replace( /<\/script/g, '<\\/script' ) + ';' | |
| }} /> |
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 _inspect2(input, depth) { | |
| var maxDepth = 4; | |
| var maxKeys = 15; | |
| if (depth === undefined) { | |
| depth = 0; | |
| } | |
| depth += 1; |
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
| // Webpack config for development | |
| var fs = require('fs'); | |
| var path = require('path'); | |
| var webpack = require('webpack'); | |
| var assetsPath = path.resolve(__dirname, '../static/dist'); | |
| var host = (process.env.HOST || 'localhost'); | |
| var port = parseInt(process.env.PORT) + 1 || 3001; | |
| // https://github.com/halt-hammerzeit/webpack-isomorphic-tools | |
| var WebpackIsomorphicToolsPlugin = require('webpack-isomorphic-tools/plugin'); |