Skip to content

Instantly share code, notes, and snippets.

View AlexAegis's full-sized avatar
🦔
ʕ•ᴥ•ʔ

Sandor AlexAegis

🦔
ʕ•ᴥ•ʔ
View GitHub Profile
use tokio::{runtime::Builder, sync::{mpsc}};
use winit::{event::{Event, WindowEvent}, event_loop::{ControlFlow, EventLoop}, window::{Window, WindowBuilder}};
pub struct Gpu {
pub surface: wgpu::Surface,
pub device: wgpu::Device,
pub queue: wgpu::Queue,
pub sc_desc: wgpu::SwapChainDescriptor,
pub swap_chain: wgpu::SwapChain,
@XSystem252
XSystem252 / RaspberryPi4Archlinux64EncryptionUSBBootBtrfsGuide.md
Last active March 31, 2024 17:51
How To Set Up a Raspberry Pi 4 with Archlinux 64-bit (AArch64) and Full Disk Encryption (+SSH unlock), USB Boot (No SD-Card) and btrfs

How To Set Up a Raspberry Pi 4 with Archlinux 64-bit (AArch64) and Full Disk Encryption (+SSH unlock), USB Boot (No SD-Card) and btrfs

Written by: XSystem
First published on: 20 Dec 2020
Last updated on: 20 Dec 2020

[0] Introduction

Overview

@TheZoc
TheZoc / Setting up guide for ArchLinux on Raspberry Pi.md
Last active May 3, 2024 23:08
This is a guide to setup Arch Linux in Raspberry Pi 4, using macOS as the auxiliary system.

Raspberry Pi Setup Guide

This guide will use either a macOS or an ArchLinux base system, to prepare a microSD card with Arch Linux for Raspberry Pi.

If someone managed to do the initial setup using Windows, please let me know, so I can add to this guide.

This guide will be verbose at times for some simple tasks. This is intended to help people just starting out, so it's not confusing. If something confuses you, let me know and I'll try my best to answer it.

@ScriptedAlchemy
ScriptedAlchemy / MutateRuntimePlugin.js
Last active August 4, 2023 01:01
Remote PublicPath Modification
const PLUGIN_NAME = "MutateRuntimePlugin";
class MutateRuntimePlugin {
/**
*
* @param {FederationDashboardPluginOptions} options
*/
constructor(options) {}
/**
@bergmannjg
bergmannjg / rearct-native-app-in-wsl2.md
Last active May 8, 2024 17:43
Building a react native app in WSL2
@tomhicks
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages
@laughinghan
laughinghan / Every possible TypeScript type.md
Last active May 8, 2024 11:14
Diagram of every possible TypeScript type

Hasse diagram of every possible TypeScript type

  • any: magic, ill-behaved type that acts like a combination of never (the proper [bottom type]) and unknown (the proper [top type])
    • Anything except never is assignable to any, and any is assignable to anything at all.
    • Identities: any & AnyTypeExpression = any, any | AnyTypeExpression = any
    • Key TypeScript feature that allows for [gradual typing].
  • unknown: proper, well-behaved [top type]
    • Anything at all is assignable to unknown. unknown is only assignable to itself (unknown) and any.
    • Identities: unknown & AnyTypeExpression = AnyTypeExpression, unknown | AnyTypeExpression = unknown
  • Prefer over any whenever possible. Anywhere in well-typed code you're tempted to use any, you probably want unknown.
@mcpower
mcpower / aoc-tips.md
Last active March 27, 2024 03:28
Tips for getting on the Advent of Code leaderboard

Hi, I'm mcpower. I've done Advent of Code seriously for two years now in Python, placing 9th in 2018 and 12th in 2017. This year, I'm taking a break from aiming for the leaderboard - while it's fun and all, it is a bit stressful at times (the good kind of stress, though!). As such, I'd like to share a few tips for anyone wanting to aim for the leaderboard.

This is everything that worked for me. Your mileage may vary, though - don't take this as gospel, see what works for you.

Go fast

Go fast.

@AlexAegis
AlexAegis / infinite-progress.operator.ts
Last active November 28, 2019 14:15
RxJS Loading and progress tracking pipeline operator with an arbitrary number of sources that can be extended anytime!
import { of, Subject, Observable, OperatorFunction } from 'rxjs';
import { delay, tap, map, flatMap, mergeScan, reduce, finalize } from 'rxjs/operators';
/**
* Over-time loader. This pipeline can be attached to a non-ending observable, though, you can't rely
* on the `finalize()` operator for checking if the loading is done or not.
* The observables you supply into it should be completeable.
*
* This can be extremely useful when you want that each of the 'loader' start as soon as possible, but still keep
* track of the progress. At the last `tap()` you can always see when one loader finishes that how many observables