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
| #!/bin/zsh | |
| # Don't name this *.zsh, the extension is just for github | |
| if [ "$1" = "-h" ]; then | |
| echo -e "Usage: git tmp\n\nAdds all tracked und untracked files and creates a new commit with the title 'TMP'" | |
| else | |
| git add -A | |
| git commit -m "TMP" | |
| fi |
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
| #!/usr/bin/env node | |
| const ANIMAL_DATA = { | |
| "mammals": [ | |
| "Aardvark", | |
| "Alpaca", | |
| "Anteater", | |
| "Antelope", | |
| "Ape", |
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
| // query is a GraphQL query definition and variables an object whose keys are variable values for that definition | |
| fetch( | |
| "/graphql", | |
| { | |
| method: "POST", | |
| credentials: "same-origin", | |
| headers: { | |
| "Content-Type": "application/json" | |
| }, | |
| body: JSON.stringify({ |
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
| { | |
| "schema": { | |
| "types": [ | |
| { | |
| "kind": "OBJECT", | |
| "name": "AppAttachment", | |
| "description": "File/image attachments", | |
| "fields": [ | |
| { | |
| "name": "description", |
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
| j.noop(); | |
| j.doExpression(body) | |
| j.bindExpression(object, callee) | |
| j.parenthesizedExpression(expression) | |
| j.exportNamespaceSpecifier(exported) |
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
| # via https://devtalk.blender.org/t/alternative-in-2-80-to-create-meshes-from-python-using-the-tessfaces-api/7445/3 | |
| # Example of creating a polygonal mesh in Python from numpy arrays | |
| # Note: this is Python 3.x code | |
| # | |
| # $ blender -P create_mesh.py | |
| # | |
| # See this link for more information on this part of the API: | |
| # https://docs.blender.org/api/blender2.8/bpy.types.Mesh.html | |
| # |
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 bzv0 = new Vector3(); | |
| const bzv1 = new Vector3(); | |
| function quadraticBezier( v0, v1, v2, t, out) | |
| { | |
| bzv0.x = v0.x + (v1.x - v0.x) * t; | |
| bzv0.y = v0.y + (v1.y - v0.y) * t; | |
| bzv0.z = v0.z + (v1.z - v0.z) * t; | |
| bzv1.x = v1.x + (v2.x - v1.x) * t; |
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
| // Field conditions. Used in the form e.g. field("myField").lt(value(5)). Number is the number of arguments. For example | |
| // between takes a lower and an upper value. | |
| // "in" is kind of special and requires one values() argument | |
| export const FIELD_CONDITIONS = { | |
| "greaterOrEqual":1, | |
| "lessOrEqual":1, | |
| "lt":1, | |
| "notBetweenSymmetric":2, | |
| "notEqualIgnoreCase":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
| [ | |
| 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 147, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 147, 1485, 0, 5, 1, 0, 0, 1, 1, 1, 0, 1, | |
| 1485, 1957, 0, 1953, 0, 0, 1957, 0, 1957, 1957, 1957, 1957, 1957, 225, 0, 0, 0, 0, 1, 65, 129, 0, 0, 0, 225, 1, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
| export function heightLimit(x) | |
| { | |
| const beach = 0.05; | |
| const beachSquared = beach*beach; | |
| const mountain = 0.6; | |
| const mountain_mid = 0.8; | |
| if (x < beach) | |
| { |
NewerOlder