hello
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 { Quaternion, Euler } from 'three' | |
// Reusuable objects to save on GC | |
const quaternion = new Quaternion() | |
const euler = new Euler() | |
// TODO: Do we need to do this or will Rapier just accept a Three quaternion? | |
const rotationToQuaternion = (rotation) => { | |
const { w, x, y, z } = quaternion.setFromEuler(euler.set(...rotation)) | |
return { w, x, y, z } |
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
AXIS M7011 firmware v5.90.1 (10/2015) | |
https://drive.google.com/file/d/1KCPKUMBI9H7JoiBssCY9Fnxe6oRkdFwP/view?usp=drive_web |
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 { useEffect, useRef } from 'react' | |
import { useThree } from '@react-three/fiber' | |
import { PerspectiveCamera } from '@react-three/drei' | |
import useCamera from './useCamera' | |
// Camera bound to origin/coords state | |
const MapCamera = props => { | |
const invalidate = useThree(s => s.invalidate) | |
const groupRef = useRef() | |
const cameraRef = useRef() |
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 React, { useEffect } from 'react' | |
import { useThree } from 'react-three-fiber' | |
import { GestureType, gestureStream } from '@thi.ng/rstream-gestures' | |
import { map } from '@thi.ng/transducers' | |
import { tryCatch } from 'ramda' | |
// Calculate the difference between 2 [x,y] vectors | |
const calcDelta = (key, a, b) => [a[key][0] - b[key][0], a[key][1] - b[key][1]] | |
// Calculate the angle and distance between 2 pointers |
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 React, { memo } from 'react'; | |
import { render } from 'react-dom'; | |
import { stream, scan } from 'flyd'; | |
import { fromJS } from 'immutable'; | |
const Box = memo(props => { | |
const { id, value } = props; | |
// Show re-renders by changing bg color | |
const color = Math.round(Math.random() * 1000); | |
return ( |
This is a simple CI/CD config for Github Actions. Hopefully it saves you some time.
It runs npm run build
, then overwrites a folder in a s3 bucket with the local dist
folder.
I have not thoroughly tested the module cache system (.npm
instead of node_modules
).
This guide is licensed under CC0 (public domain).
- Add
.github/workflows/deploy-to-s3.yml
to your repo
neftaly@nef-w10:~$ ssh [email protected] -p 2020
[email protected]'s password:
WhenItsReady
___________ ____________ _____ ___ _____ _ _______ ______ ___________
/ __ \ _ \ | ___ \ ___ \ _ | |_ | ___| | / /_ _| | ___ \ ___| _ \
| / \/ | | | | |_/ / |_/ / | | | | | |__ | |/ / | | | |_/ / |__ | | | |
| | | | | | | __/| /| | | | | | __|| \ | | | /| __|| | | |
| \__/\ |/ / | | | |\ \\ \_/ /\__/ / |___| |\ \ | | | |\ \| |___| |/ /
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
#include <FastLED.h> | |
#define DATA_PIN 5 | |
#define LED_TYPE WS2812 | |
#define COLOR_ORDER GRB | |
#define NUM_LEDS 480 | |
CRGB leds[NUM_LEDS]; | |
int pos = 0; |
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
# i3 config file (v4) | |
# | |
# Please see https://i3wm.org/docs/userguide.html for a complete reference! | |
set $mod Mod4 | |
# Font for window titles. Will also be used by the bar unless a different font | |
# is used in the bar {} block below. | |
font pango:monospace 8 |
NewerOlder