Skip to content

Instantly share code, notes, and snippets.

View Dessix's full-sized avatar
🏳️‍⚧️

Zoey Dessix

🏳️‍⚧️
  • Microsoft; Theseus Institute
  • Redmond, WA, U.S.
View GitHub Profile
@Dessix
Dessix / FableInlineGetterCompiledResult.js
Last active January 17, 2017 06:37
Fable - Compiled Result of Inline Getter/Setter Get invocations - See https://github.com/fable-compiler/Fable/issues/656
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.TestClass = undefined;
var _Symbol2 = require("fable-core/umd/Symbol");
var _Symbol3 = _interopRequireDefault(_Symbol2);
@Dessix
Dessix / keybase.md
Created February 5, 2017 02:26
keybase.md

Keybase proof

I hereby claim:

  • I am dessix on github.
  • I am dessix (https://keybase.io/dessix) on keybase.
  • I have a public key ASBKmFhPWMwJ2ITmcbo5ka-hwqyxGZcSNAdXLTf2CtB96Qo

To claim this, I am signing this object:

@Dessix
Dessix / no_transfer.rs
Created June 26, 2019 02:32
TransferOwnership Ignore Wrapper - NoTransfer
use std::ops::{Deref, DerefMut, Not};
use tungsten::{TransferOwnership, TransferToken};
pub struct NoTransfer<T: Sized>(T);
impl<T> TransferOwnership for NoTransfer<T> {
fn transfer_to(&self, _: &TransferToken) {
// Do nothing
}
}
@Dessix
Dessix / symlinks.hs
Last active August 13, 2020 02:49
SymLinks and Interpreters in Haskell
@Dessix
Dessix / lib.rs
Created March 20, 2021 15:46
Rust Analyzer inference issues with futures
use futures::{Future, future::BoxFuture};
pub trait InferenceBreaker {
fn trait_boxed_break(&self) -> BoxFuture<Result<(), ()>>;
}
pub struct TraitlessBreaker;
impl TraitlessBreaker {
pub fn struct_boxed_break<'a>() -> BoxFuture<'a, Result<(), ()>> {
todo!()
@Dessix
Dessix / Example.cs
Last active January 8, 2022 20:19
HDRP RenderingLayerMask Setting - Per-camera runtime overrides for `renderingLayerMask`
using System;
using UnityEngine;
using UnityEngine.Rendering.HighDefinition;
public class Test : MonoBehaviour {
[SerializeReference] public Camera Camera;
[SerializeReference] public GameObject SubScene;
public void Start() {
@Dessix
Dessix / hlistdep.rs
Last active July 7, 2022 03:47
Rust Dependency Extraction (Not working, requires HRTB)
use frunk::{hlist::Selector, indices::Here};
trait Has<A> {
fn get(&self) -> &A;
}
impl<A, S> Has<A> for S
where
S: Selector<A, Here>,
{
@Dessix
Dessix / generate-stack-sizes.lua
Created September 4, 2022 05:17
Generate stack size combinators for all items in Factorio
-- A tweak atop https://github.com/technicalfactorio/technicalfactorio/blob/master/combinators/generate_signal_index.lua
-- to generate stack sizes instead of unique identifiers.
-- Does not create entries for virtual signals, as they cannot be stacked.
-- Meant to be used in combination with:
-- Pairwise Multiplication: https://www.reddit.com/r/factorio/comments/pg2dai/perfect_parallel_pairwise_multiplier/
-- Pairwise Division: https://www.reddit.com/r/factorio/comments/kl31f0/pairwise_division_with_combinators/
--
-- Run this as a console command by copying starting with this slash, and pasting it into chat: /c
local map={}
local comb = game.player.selected
@Dessix
Dessix / configuration.nix
Created May 2, 2023 01:38
Systemd System-level OpenRGB service configuration to set lighting on startup
{
# ...
services.orgb = {
enable = true;
motherboard = "amd";
};
# ...
}
@Dessix
Dessix / nix-source-tree-abstraction-failures.json
Last active July 3, 2023 00:54
Source Tree Abstraction success/failure data
[
{
"impure": false,
"nixVersion": "Stable",
"success": true,
"useCleanSource": false,
"useFilteredPath": false,
"useLinkFarm": false,
"usePathSource": false,
"useStringifiedPath": false