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
# blender 2.8 | |
""" | |
This script implements Convey's "Game of Life" in Blender 2.8 | |
It relies on the blender file containing a mesh called "Cube" | |
(sidelength = 1) and an empty collection called "Grid". | |
# original code: https://gist.github.com/bened-h/9d56a03e9a14b917980c1d4039bf1687 | |
# inspired by this comment https://www.reddit.com/r/generative/comments/ghuvlg/i_made_a_25dimensional_version_of_conways_game_of/fqb5nlu/ | |
""" | |
import bpy |
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
FROM elixir:slim | |
# install Node.js (>= 8.0.0) and NPM in order to satisfy brunch.io dependencies | |
# See https://hexdocs.pm/phoenix/installation.html#node-js-5-0-0 | |
RUN apt-get update -y && \ | |
apt-get install -y curl git && \ | |
curl -sL https://deb.nodesource.com/setup_13.x | bash - && \ | |
apt-get install -y inotify-tools nodejs | |
WORKDIR /code |
Community
Cheatsheets
- GenServer Cheatsheet by Benjamin Tan Wei Hao
Books
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 args = ['node', '--proxy=']; | |
const flags = ['proxy']; | |
let hasProxy = (arg) => flags.find(flag => arg.includes(flag)); | |
if(args.find(hasProxy)) { | |
console.log("proxy"); | |
} else { | |
console.log("error"); | |
} |
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent