Skip to content

Instantly share code, notes, and snippets.

View amadeus's full-sized avatar
🕶️
out here livin

Amadeus Demarzi amadeus

🕶️
out here livin
View GitHub Profile

Use Tobii Eye Tracker 5 with OpenTrack

Apr 17, 2024 Update

The latest releases of OpenTrack now support Tobii natively, I recommend going that route now instead of this method.

Jan 19, 2023 Update

Thanks to user Henkeman in the comments, I

function useDragProps(id: string) {
const [dragged, setDragged] = useState(false);
const [over, setOver] = useState(false);
const {startDrag, stopDrag, getDragged} = useContext(ChecklistManagerContext);
const onDragStart = useCallback(
(event: DragEvent<HTMLElement>) => {
startDrag(id);
event.dataTransfer.setData('text/plain', id);
event.dataTransfer.effectAllowed = 'move';
setDragged(true);
diff --git a/discord_app/modules/voice_panel/native/controls/VoicePanelControls.tsx b/discord_app/modules/voice_panel/native/controls/VoicePanelControls.tsx
index 47b462d2900..7430848a2b7 100644
--- a/discord_app/modules/voice_panel/native/controls/VoicePanelControls.tsx
+++ b/discord_app/modules/voice_panel/native/controls/VoicePanelControls.tsx
@@ -279,7 +279,7 @@ function useControlsGesture(
...wrapperSpecs.value,
x: 0,
y: 0,
- width: windowDimensions.value.width,
+ width: getMaxDrawerWidth(windowDimensions.value.width),
@amadeus
amadeus / prettier.json
Last active September 9, 2022 20:03
.prettierrc template
{
"printWidth": 120,
"trailingComma": "es5",
"bracketSpacing": false,
"singleQuote": true,
"bracketSameLine": true,
"overrides": [
{
"files": ["*.css", "*.styl"],
"options": {
@amadeus
amadeus / gist:983364
Created May 20, 2011 17:24
Penner's easing methods in CSS
'linear:in': cubic-bezier(0,0,1,1)
'linear:out': cubic-bezier(0,0,1,1)
'linear:in:out': cubic-bezier(0,0,1,1)
'expo:in': cubic-bezier(0.71,0.01,0.83,0)
'expo:out': cubic-bezier(0.14,1,0.32,0.99)
'expo:in:out': cubic-bezier(0.85,0,0.15,1)
'circ:in': cubic-bezier(0.34,0,0.96,0.23)
'circ:out': cubic-bezier(0,0.5,0.37,0.98)
'circ:in:out': cubic-bezier(0.88,0.1,0.12,0.9)
'sine:in': cubic-bezier(0.22,0.04,0.36,0)
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (timer_elapsed(tt_timer) > 500) {
press_count = 0;
}
switch (keycode) {
case TT_LL: {
if (record->event.pressed) {
if (layer_state_is(_LOWER)) {
layer_off(_LOWER);
press_count = 0;
export function logChanges(newProps: any, prevProps: any) {
if (process.env.NODE_ENV === 'development') {
const changes = Object.create(null);
Object.keys(newProps).forEach((key) => {
const newValue: any = newProps[key];
const oldValue: any = prevProps[key];
if (newValue !== oldValue) {
changes[key] = [oldValue, newValue];
}
});
{
"id": "spikey-blobs",
"containerSize": 224,
"radius": 42,
"rings": [
{
"id": "51ec5877-e2d0-4a58-8076-2196ec53c880",
"strokeColor": "transparent",
"points": 50,
"spread": 14,

Spitfire Camera Thoughts

So a couple days ago I reported a bug where one of the camera views was bugged, and it looked like this:

example

I actually don't know much about how to build third party planes in MSFS, but I saw that GotGravel had made some tweaks to the cameras and it looked as simple as just digging into cameras.cfg and making some tweaks, so I dug into a text

{
"id": "1374:368",
"name": "Yellow - Warning messages - Idle statuses",
"type": "TEXT",
"blendMode": "PASS_THROUGH",
"absoluteBoundingBox": {
"x": 1460,
"y": 923,
"width": 240,
"height": 76