This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
body { | |
margin: 0; | |
height: 100svh; | |
padding: 0; | |
overflow: hidden; |
This file contains 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
extends Node2D | |
@export | |
var a: RigidBody2D = null | |
@export | |
var b: RigidBody2D = null | |
@export | |
var a_affected: bool = false | |
@export | |
var b_affected: bool = false |
This file contains 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 interface pb_schema_entry_schema_options { | |
min: number; | |
max: number; | |
pattern: string; | |
} | |
export interface pb_schema_entry_schema { | |
system: boolean; | |
id: string; | |
name: string; | |
type: string; |
This file contains 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
package common | |
import ( | |
"os" | |
"os/signal" | |
"syscall" | |
) | |
func HandleSigTerm(cb func(sig os.Signal)) { | |
signalChannel := make(chan os.Signal, 2) |
This file contains 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
onModelBeforeCreate((e)=>{ | |
const item_name = "responses"; | |
const container_name = "tickets"; | |
const container_ref = "ticket"; | |
const container_id = e.model.get(container_ref); | |
if (container_id) { |
This file contains 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 upThrust = 1; | |
var forwardThrust = 2; | |
var absoluteForce = new Vector3 ( 0, upThrust, forwardThrust ); | |
var relativeForce = absoluteForce * Basis.Transposed(); //The magic BS that makes it work | |
ApplyCentralForce( relativeForce ); |
This file contains 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
using Godot; | |
// Attach to an Area3D | |
// listens to collisions with area3d (use area3d's collision mask to select what objects should walk thru holes) | |
// sets or unsets the cutLayer (see in editor after attaching this script) | |
// dont forget to build C# project once to see the editor field for PhysicsHole) | |
public partial class PhysicsHole : Area3D { | |
[Export] |
This file contains 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 { Tensor, layers, sequential, tensor, train } from "@tensorflow/tfjs-node"; | |
function create_model () { | |
const model = sequential(); | |
model.add(layers.dense({ | |
units: 16, | |
activation: "relu", | |
inputShape: [1] | |
})); |
This file contains 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
set number | |
set tabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
call plug#begin('~/.vim/plugged') | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'} | |
call plug#end() |
This file contains 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
interface EventCallback<T> { | |
(evt: T): boolean|void; | |
} | |
class EventDispatcher<EventMap> { | |
listeners: Map<string, Set<EventCallback<keyof EventMap>>>; | |
constructor () { | |
this.listeners = new Map(); |
NewerOlder