Skip to content

Instantly share code, notes, and snippets.

Avatar
🏳️‍🌈

Zoey Dessix

🏳️‍🌈
View GitHub Profile
@Dessix
Dessix / lib.rs
Created Mar 20, 2021
Rust Analyzer inference issues with futures
View lib.rs
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 / symlinks.hs
Last active Aug 13, 2020
SymLinks and Interpreters in Haskell
View symlinks.hs
@Dessix
Dessix / no_transfer.rs
Created Jun 26, 2019
TransferOwnership Ignore Wrapper - NoTransfer
View no_transfer.rs
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
}
}
View 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 / FableInlineGetterCompiledResult.js
Last active Jan 17, 2017
Fable - Compiled Result of Inline Getter/Setter Get invocations - See https://github.com/fable-compiler/Fable/issues/656
View FableInlineGetterCompiledResult.js
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.TestClass = undefined;
var _Symbol2 = require("fable-core/umd/Symbol");
var _Symbol3 = _interopRequireDefault(_Symbol2);
View AbstractTypes_CompiledOutput.js
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.AbstractTypeExtended$2E$get_prop = exports.TypeModule = undefined;
var _Symbol2 = require("fable-core/umd/Symbol");
var _Symbol3 = _interopRequireDefault(_Symbol2);
@Dessix
Dessix / GithubFlipComparison.user.js
Last active Nov 17, 2016
Github Script - Flip Comparison Direction - Install: https://git.io/vXQ4p
View GithubFlipComparison.user.js
// ==UserScript==
// @name Github - Flip Comparison
// @namespace http://dessix.net/userscripts/github/flip
// @version 0.1
// @updateURL https://gist.github.com/Dessix/d1d4c4090f4348cf030ec61977952898/raw/GithubFlipComparison.user.js
// @description Flip github branches in comparison.
// @author Dessix
// @match *://github.com/*/*/compare/*...*
// @grant none
// @require https://code.jquery.com/jquery-3.1.1.slim.min.js
@Dessix
Dessix / HeapSort.scala
Created Nov 1, 2016
Crazy attempt at heapsort in Scala- Also, Scala's generics are finicky when it comes to upper type bounds
View HeapSort.scala
import scala.annotation.tailrec
import scala.collection.mutable.ListBuffer
import scala.language.postfixOps
import scala.math._
import scala.math.Ordering._
import scala.math.Ordered._
//MIN HEAP
def makeMutable[T](in: Seq[T]): ListBuffer[T] = {
@Dessix
Dessix / MaxSummedSubarray.cpp
Created Oct 7, 2016
Max Summed Subarray Problem in O(N), C++
View MaxSummedSubarray.cpp
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <stdexcept>
#include <memory>
using namespace std;
typedef unsigned int uint;
@Dessix
Dessix / PossiblePeopleTowerSolution.py
Created Oct 5, 2016
Possible for the people tower teaser
View PossiblePeopleTowerSolution.py
from typing import *
class Athlete:
def __init__(self, mass: float, strength: float):
self.Mass = mass
self.Strength = strength
def __hash__(self):
return hash((self.Mass, self.Strength))
def __lt__(self, other):
return (self.Mass, self.Strength) < (other.Mass, other.Strength)