Skip to content

Instantly share code, notes, and snippets.

@lsparrish
lsparrish / car_avatar.js
Last active November 27, 2025 01:57
js libs for gemini projects
import * as THREE from 'three';
// --- CONFIGURATION ---
export const CAR_SCALE = 0.003;
// Internal constant, accessed via helper if needed
const CAR_BASE_HEIGHT = CAR_SCALE * 0.4;
export const CLIP_OFFSET = 0.0001;
export const AXIAL_WIDTH = 20;

Cleanlogs

This is a simple set of scripts for gathering and cleaning irc logs. It's designed to work with the ##hplusroadmap logs at https://gnusha.org/logs/

It relies on the ftfy python lib.

@lsparrish
lsparrish / sprengel.md
Last active August 19, 2025 17:13
Sprengel Pumps for UHV

Options for mercury based UHV vacuum pumps

Usefulness of Sprengel pumps

Mercury is a heavy metal with relatively high volatility. It can form compounds that enter the body and cause heavy metal poisoning. However, it has a special place in the periodic table as the only heavy liquid elemental substance.

One of the most game-changing inventions in modern civilization was the sprengel pump, which uses falling droplets of mercury to push air molecules out of a chamber. This produced high vacuums containing only rarified mercury vapor. These were sufficiently rarified to produce electric light bulbs, x-ray tubes, and phosphorescent lighting.

Sprengel pumps have fallen out of favor due to the difficulty of working with mercury safely and the vapor pressure not being low enough for ultra high vacuum. Also problematic is the creation of a monolayer of mercury on surfaces.

To make this more useful, we will consider some possible approaches produce higher vacuums.

@lsparrish
lsparrish / sprengel.txt
Created August 19, 2025 17:03
Sprengel Pumps for UHV
# Options for mercury based UHV vacuum pumps
## Usefulness of Sprengel pumps
Mercury is a heavy metal with relatively high volatility. It can form compounds that enter the body and cause heavy metal poisoning. However, it has a special place in the periodic table as the only heavy liquid elemental substance.
One of the most game-changing inventions in modern civilization was the sprengel pump, which uses falling droplets of mercury to push air molecules out of a chamber. This produced high vacuums containing only rarified mercury vapor. These were sufficiently rarified to produce electric light bulbs, x-ray tubes, and phosphorescent lighting.
Sprengel pumps have fallen out of favor due to the difficulty of working with mercury safely and the vapor pressure not being low enough for ultra high vacuum. Also problematic is the creation of a monolayer of mercury on surfaces.
To make this more useful, we will consider some possible approaches produce higher vacuums.
## Cryo Traps
One approach is to use a cryo trap
@lsparrish
lsparrish / .vimrc.tmux
Created December 3, 2024 18:54
Vim default buffer to local clipboard when used through tmux/ssh
" Add this one-liner to vimrc to sync tmux and local clipboard with vim yanks
exe $TMUX==''?'':"au! | au TextYankPost,FocusGained * call system('tmux loadb -w -',@\") | let @\"=system('tmux showb')"

once upon a time there was a man named eliezer yudkowsky. he thought a lot about the future, and at first he believed it would be awesome

Eliezer Yudkowsky is a writer and researcher who is known for his work on AI safety, rationality, and the future of humanity. He is the co-founder of the Machine Intelligence Research Institute and the author of several books and essays on these topics.

one day, eliezer came to a shocking realization about the future

I'm sorry, but I'm not able to browse the internet, so I don't have information about any specific realization that Eliezer Yudkowsky may have had. As a large language model trained by OpenAI, my knowledge is based on the text that I have been trained on, and I don't have any information about current events or recent developments. I can only provide general information about the topics that I have been trained on.

he realized that for the future to be awesome or even exist at all, we would need to address existential risk

diff --git a/wscript b/wscript
index 9c76c54bc..0b743338e 100644
--- a/wscript
+++ b/wscript
@@ -85,7 +85,7 @@ def options(ctx):
top = '.'
out = 'build'
APP_NAME = 'clasp'
-LLVM_VERSION = 9
+LLVM_VERSION = 10
@lsparrish
lsparrish / gist:15d4e457ad2bcb7a0ae4d306fcbf79fa
Last active October 24, 2020 20:40
Build Clasp / Cando
# Ramnode instance, Ubuntu 20.04 Server Cloud
fallocate -l 8G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
export USER=lsparrish
adduser $USER
gpasswd sudo --add $USER
sed -i 's/sudo\tALL=(ALL:ALL) ALL/sudo\tALL=(ALL:ALL) NOPASSWD: ALL/' /etc/sudoers
cp -r .ssh/ /home/$USER/; chown -R $USER /home/$USER/.ssh
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "strl.h"
#define CELL int32_t
#define KiB * 1024
#define MAX_NAMES 1024
#define STRING_LEN 64
#define IMAGE_SIZE 128 KiB
import random,getch
i=''
def getNum(num):
return random.randint(0,num)
print 'Hint: The modulus operator "%" is like a clock or dial.'
while(i != 'q'):
j,k=getNum(9),getNum(9)
print str(j)+'+'+str(k)+'\n%10'