Skip to content

Instantly share code, notes, and snippets.

System.InvalidCastException:
[A]ReplGlobals cannot be cast to [B]ReplGlobals.
Type A originates from 'SelfBot, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location 'C:\Users\Khionu\Documents\Visual Studio 2017\Projects\SelfBot\SelfBot\bin\Debug\netcoreapp1.1\SelfBot.dll'.
Type B originates from 'SelfBot, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location 'C:\Users\Khionu\Documents\Visual Studio 2017\Projects\SelfBot\SelfBot\bin\Debug\netcoreapp1.1\SelfBot.dll'.
at Submission#0..ctor(Object[] submissionArray)
at Submission#0.<Factory>(Object[] submissionArray)
at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.<RunSubmissionsAsync>d__9`1.MoveNext()
@khionu
khionu / FigurativelyLiterally.md
Created December 25, 2017 01:12
Famous works of literature that used "literally" in a figurative sense
{
"roll": {
"comment": "",
"id": "e063ea9c-9cf8-411e-9dfc-06309179e9ac",
"dice": [
{
"id": "219587d9-cf7a-4190-b106-f279c99b38d4",
"child": "00ddfeda-888c-434f-9edd-b82385a2ec8a",
"die": "D100",
"is_dropped": true,
@khionu
khionu / refined_disk_recycle.zs
Created September 6, 2018 23:26
A CraftTweaker script to enable AE2-esque recycling of Disks for Refined/Reborn storage.
import crafttweaker.item.IItemStack;
var diskToParts_refined = {
<refinedstorage:storage_disk:0> : <refinedstorage:storage_part:0>,
<refinedstorage:storage_disk:1> : <refinedstorage:storage_part:1>,
<refinedstorage:storage_disk:2> : <refinedstorage:storage_part:2>,
<refinedstorage:storage_disk:3> : <refinedstorage:storage_part:3>,
<refinedstorage:fluid_storage_disk:0> : <refinedstorage:fluid_storage_part:0>,
<refinedstorage:fluid_storage_disk:1> : <refinedstorage:fluid_storage_part:1>,
<refinedstorage:fluid_storage_disk:2> : <refinedstorage:fluid_storage_part:2>,

Keybase proof

I hereby claim:

  • I am khionu on github.
  • I am khionu (https://keybase.io/khionu) on keybase.
  • I have a public key ASB3HumwhdHEwj7Lr2pU8v_8prtoe6mFrKhy823KFpDOdgo

To claim this, I am signing this object:

@khionu
khionu / work_pool.rs
Last active December 22, 2019 20:00
A work-stealing WorkPool using crossbeam-deque
use std::sync::{Arc, RwLock};
use crossbeam_deque::{Injector, Steal, Stealer, Worker};
pub struct WorkPool<T> {
global: Arc<Injector<T>>,
local: Worker<T>,
stealers: Arc<RwLock<Vec<Stealer<T>>>>,
}
@khionu
khionu / Cargo.toml
Last active October 6, 2020 16:08
Rust module for being agnostic between the Log and Tracing crates
# Need both of these. Make sure to add the current version
[dependencies.log]
version = "..."
optional = true
[dependencies.tracing]
version = "..."
optional = true
# Add these for configuring
# New Amethyst Structure
- `amethyst` - Primary import
- No longer wrapper crate
- Enough for simple examples
- Include ECS, renderer, input, and bare essentials
- ECS: raw re-export of Legion
- Renderer
- Split into 2D and 3D APIs w/ feature flags
- Compat between 2D/3D. 2D should be able to write to a mesh that 3D can control, without codependency
- Not Rendy based. See viability of `wgpu-rs` in multithreading, otherwise GFX-HAL
@khionu
khionu / README.md
Last active September 13, 2020 03:29
Quick installation of Docker on Ubuntu

Prelim

This script assumes you have never installed Docker.

Usage

curl -fsSL <RAW LINK TO install-docker.sh> | sudo sh -