Skip to content

Instantly share code, notes, and snippets.

View eliassjogreen's full-sized avatar
:shipit:
Probably ECMAScripting

Elias Sjögreen eliassjogreen

:shipit:
Probably ECMAScripting
View GitHub Profile

Setup

This is just a document containing some planning and notes about the next time I'll set up a personal computer. Nothing set in stone, but some general ideas for me to remember.

Questions seeking answers

  • What shell do I want to use?
    • Currently I use nushell and am happy with it as a language and shell. What bothers me is having to switch to a sh compatible shell every time I copy paste a script
@eliassjogreen
eliassjogreen / kv_deque.ts
Created May 16, 2023 22:16
Deno.Kv deque
// Copyright 2023 denosaurs. All rights reserved. MIT license.
async function getEdgeEntry(kv: Deno.Kv, queue: string, back: boolean) {
return (
await kv.list({ prefix: [queue] }, { limit: 1, reverse: back }).next()
).value;
}
async function atomicRetry(op: Deno.AtomicOperation) {
let success = false;
@eliassjogreen
eliassjogreen / fade.tsx
Created April 27, 2023 08:29
expo-av fade
import { Audio } from "expo-av";
export function linear(n: number): [number, number] {
return [1 - n, n];
}
export function halfsine(n: number): [number, number] {
return [1 - Math.sin(n * Math.PI * 0.5), Math.sin(n * Math.PI * 0.5)];
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am eliassjogreen on github.
  • I am eliassjogreen (https://keybase.io/eliassjogreen) on keybase.
  • I have a public key ASDRt6ltXeYxbFn3ArCGnco-hS_vS_ggwDbbRGisZ-lhMQo

To claim this, I am signing this object:

@eliassjogreen
eliassjogreen / readme.md
Created May 11, 2019 17:08
How to remove mcleaks and fix "Could not connect to server." issue
  1. Open your favorite text editor
  2. Open "%SystemRoot%\System32\drivers\etc\hosts"
  3. Delete all lines that reference "authserver.mojang.com" or "sessionserver.mojang.com"
  4. Profit