Skip to content

Instantly share code, notes, and snippets.

View fatso83's full-sized avatar
🐢
Two toddlers. Very little time for OSS after work hours. File a PR!

Carl-Erik Kopseng fatso83

🐢
Two toddlers. Very little time for OSS after work hours. File a PR!
View GitHub Profile
@fatso83
fatso83 / Response Wheres the Emergency.md
Created July 11, 2026 06:26
A Response to Eschenbach’s “Where’s the Emergency?”

A Response to Eschenbach’s “Where’s the Emergency?”

After seeing https://x.com/WEschenbach/status/2075720590984708529

The tweet reply rests on a false distinction: that he presented sourced facts while his critics merely “handwaved.” The problem is not that his post contains no facts. It is that many of those facts do not support the conclusions he draws from them.

Eschenbach repeatedly treats declining disaster mortality as evidence that climate risk is not increasing. But mortality depends on far more than the physical hazard. Forecasting, healthcare, infrastructure, building standards, and emergency response have all reduced vulnerability. Deaths can therefore fall even while climatic hazards intensify. The IPCC synthesis report concludes that human-caused climate change is already affecting weather and climate extremes worldwide and causing widespread losses and damage.

He also relies on selective indicators and mismatched

@fatso83
fatso83 / ringbuffer.js
Created May 7, 2026 16:00
JS compact ring buffer useful for logs
// basically https://stackoverflow.com/a/4774081/32164693
function createRingBuffer(length){
let pointer = 0;
const buffer = [];
return {
get(key){return buffer[key];},
push(item){
buffer[pointer] = item;
@fatso83
fatso83 / dev_day.md
Last active March 3, 2026 05:59
2026-03-01 AI Dev Day at TRYDig
class Strange:
foo = 10
def inc(self):
self.foo += 1
a = Strange()
b = Strange()
from PIL import Image
# Create a 1x1 pixel image
# img = Image.new('1', (5, 5), 1) # '1' for 1-bit pixels, (1, 1) is the size, and 1 is the color (white)
img = Image.new('1', (5, 5), 0) # '1' for 1-bit pixels, (1, 1) is the size, and 1 is the color (white)
# Save the image with maximum compression
img.save('minimal.png', 'PNG', optimize=True, compression_level=9)
@fatso83
fatso83 / SealedSwitch.java
Last active October 8, 2025 09:41
Sealed classes switching on instanceof
import java.util.List;
/*
* ❯ java ./SealedSwitch.java
* SHIZZLES FOR MY NIZZLES!!!
* Whooof!
* Whooof!
* Whooof!
*/
public class SealedSwitch {
@fatso83
fatso83 / convertibleloadforstartup.md
Created September 28, 2025 22:19 — forked from eonist/convertibleloadforstartup.md
convertibleloadforstartup.md

Norwegian Wealth Tax and SAFE/SLIP Strategies for Startup Founders

Your concerns about wealth tax implications for BoldBooks Norge and the potential benefits of Swedish relocation are well-founded. Based on current Norwegian tax regulations and available investment structures, there are indeed strategies using SAFE/SLIP instruments that can help defer wealth tax exposure, though they come with specific requirements and limitations.

Understanding Norwegian Wealth Tax on Startups

Current Tax Structure

Dette oppsettet fant jeg opprinnelig på i 2021. Søk etter Teltonika i loggen for å finne det.

Oversikt

  • Ruter bygget inn i antennehus for minimal tap av signal
  • 200 m CAT5-kabel ned til hytte med forsterkning etter 100 m (Power-over-Ethernet)
  • Kan fore med egenmekket 24V/48V strømforsyning fra 12V
  • Sette opp stang på fot oppe på fjellet der det er dekning
  • ca kostnad 7-8000 kr?

Utstyr

4G-ruter: RUT240

@fatso83
fatso83 / macos-ramdisk.md
Created November 20, 2023 05:01 — forked from htr3n/macos-ramdisk.md
Creating RAM disk in macOS

Built-in

diskutil erasevolume HFS+ 'RAM Disk' `hdiutil attach -nobrowse -nomount ram://XXXXX`

where XXXXX is the size of the RAM disk in terms of memory blocks.

Notes:

@fatso83
fatso83 / Code Sandbox oddities.md
Last active June 3, 2023 08:57
Code Sandbox weirdness

CODESANDBOX ODDITIES

Code Sandbox oddities observed while working on LogicRoom exercises

codesandbox.io does its best to give the impression of a locally running environment, but the abstraction is sometimes a bit leaky. Here's some weirdness (with possible fixes)

Delayed execution of console.log

The console.log statement is actually proxied via a server and executed at a later stage. That sometimes results in weird behaviours, as the value of some field on an object can be different when it is printed than when it was logged ... The fix is making something like this and using that instead: