Sam Lanning's Avatar

Sam Lanning

@samlanning.com.bsky.social

Software, Security, Music & Lights. https://github.com/s0

25 Followers  |  45 Following  |  25 Posts  |  Joined: 21.10.2024  |  2.1616

Latest posts by samlanning.com on Bluesky

Great read!

14.10.2025 22:05 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Then you benefit from react handling the lifecycle and initialization of all the intervals / animation frames when the components render etc…

14.10.2025 21:41 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

If you need to model a simulation with a constant interval, then you could have:

- 1 use ref and useEffect & interval to update the simulation at a constant time, storing the result in a ref
- 1 state & useEffect & animation frame to derive the state from the information in the ref

14.10.2025 21:41 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

and you can have as many states as you want, but I find for animations, it’s best to only change state once per frame.

Then using the data in state, return JSX with the SVG nodes, and react will diff the changes, only making the required changes to the dom, making rendering pretty seamless.

14.10.2025 21:38 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Something like (from memory, apologies)

const Sim = () => {

const [state, setState] = useState();

useEffect(() => {
let i
const f = () => {
setState(current => ({}))
i = requestAnimationFrame(f)
}
f()
return () => cancelAnimationFrame(i);
}, [])

// …
}

14.10.2025 21:35 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0

πŸ˜…

03.10.2025 15:50 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Oh wait I think I get it, its just sharing one of the pairs of valid values πŸ€¦β€β™‚οΈ not trying to be an equivalent expression to the above! Nvm

03.10.2025 11:21 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Right, but isn’t it also possible to be both unsafe and unsound, which isn’t allowed by the last expression, but is allowed by the ones above that?

Using OR would allow every combination except unsafe and sound

03.10.2025 11:18 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Not to be that guy, but shouldn’t the logical operator on the last line be ∨ (or) not ∧ (and) πŸ˜…

03.10.2025 05:32 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
This page is a truly naked, brutalist html quine.

This is art:

secretgeek.github.io/html_wysiwyg...

18.07.2025 14:11 β€” πŸ‘ 42    πŸ” 18    πŸ’¬ 1    πŸ“Œ 2
Release notes

0.0.78

Drastically improved CodeMirror editor performance
Added MySQL block
Added dark mode support to HTTP and SQL results
Added ability to invite friends and colleagues from the desktop app
Disabled automatic update checking on Linux (since it doesn’t work there)
Improved runbook scroll position recall
Fixed a bug where a runbook wouldn’t load β€œlatest” and resulted in a blank editor
Fixed Linux installs possibly overwriting atuin CLI package (Linux users: any feedback you have for this fix is very useful)
macOS DMG has a snazzy new background :sparkles:
We’ve also opened up Organizations to everyone! This set of features is still very much a work in progress, but we’ve had a few users in testing for a while and it’s in a usable state. For now, you can create an Organization by visiting your profile page on Atuin Hub and clicking the new β€œOrganizations” tab. Once done, the dropdown at the top of the Runbook list in the Desktop app should show your org; give the app a relaunch if not.

Expect a lot of changes and improvements to Orgs in the coming weeks. In particular, soon you’ll be able to move Runbooks between workspaces, and move entire workspaces into an Org. As always, feedback is not only welcome, but deeply appreciated! :heart:

Release notes 0.0.78 Drastically improved CodeMirror editor performance Added MySQL block Added dark mode support to HTTP and SQL results Added ability to invite friends and colleagues from the desktop app Disabled automatic update checking on Linux (since it doesn’t work there) Improved runbook scroll position recall Fixed a bug where a runbook wouldn’t load β€œlatest” and resulted in a blank editor Fixed Linux installs possibly overwriting atuin CLI package (Linux users: any feedback you have for this fix is very useful) macOS DMG has a snazzy new background :sparkles: We’ve also opened up Organizations to everyone! This set of features is still very much a work in progress, but we’ve had a few users in testing for a while and it’s in a usable state. For now, you can create an Organization by visiting your profile page on Atuin Hub and clicking the new β€œOrganizations” tab. Once done, the dropdown at the top of the Runbook list in the Desktop app should show your org; give the app a relaunch if not. Expect a lot of changes and improvements to Orgs in the coming weeks. In particular, soon you’ll be able to move Runbooks between workspaces, and move entire workspaces into an Org. As always, feedback is not only welcome, but deeply appreciated! :heart:

Perhaps the biggest Atuin Desktop update yet!

Highlights

1. Orgs! Share runbooks and workspaces with your team
2. MySQL block
3. Invite friends to try the app right away, no waitlist

Changelog: forum.atuin.sh/t/desktop-de...

11.06.2025 18:17 β€” πŸ‘ 11    πŸ” 3    πŸ’¬ 1    πŸ“Œ 0
Preview
Flyht Pro Rack 8U Double Door Profi 19" Double Door Rack Usable height: 8U, Unit depth: 520 mm, Infinitely adjustable rail (no fixed increments or steps) at the front and rear, Material: 10 mm Plywood, Robust aluminium profile, Ball co...

Rack was Β£140 - www.thomann.co.uk/flyht_pro_ra... UDM ~Β£360, Mac mount Β£200, power ~ Β£200, then whatever additional modules you want. Netcon was Β£280

07.06.2025 11:58 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image Post image

I don’t have any of my own to hand, but it’s really secure in there: youtu.be/9SFQjIcq-XA?...

07.06.2025 10:38 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Directly below the dream machine. The rack mount has space for 2, but I’ve only used one of them. Unfortunately the latest gen Mac minis don’t fit in 1U any more πŸ˜₯

07.06.2025 10:18 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

πŸ™ˆ

07.06.2025 10:13 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

Nice dream machine! πŸ˜„ I don’t have a homelab setup, but I do have

- A custom built NAS running Debian and ZFS (where I run my home services)
- A portable rack in a flight case (for event lighting) with a dream machine, M2 Mac Mini, DMX output, power twist power distribution & 16A Power in πŸ˜„

07.06.2025 10:08 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0

πŸ˜‚πŸ˜‚πŸ˜‚

05.05.2025 15:14 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Cue complete lack of surprise… 🀦

Exactly as we expected, but worse than we thought

04.05.2025 22:17 β€” πŸ‘ 12    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
The Signal Clone the Trump Admin Uses Was Hacked TeleMessage, a company that makes a modified version of Signal that archives messages for government agencies, was hacked.

TeleMessage, the Israeli company that makes the modified Signal app used by Trump officials, was hacked. β€œI would say the whole process took about 15-20 minutes,” the hacker said micahflee.com/the-signal-c...

04.05.2025 22:03 β€” πŸ‘ 275    πŸ” 110    πŸ’¬ 8    πŸ“Œ 15

Can’t wait to use this! Going to be perfect for onboarding new devs to a team!

22.04.2025 23:18 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

When scholars of authoritarianism and fascism leave U.S. universities because of the deteriorating political situation here, we should really worry.

26.03.2025 00:50 β€” πŸ‘ 23838    πŸ” 8267    πŸ’¬ 600    πŸ“Œ 675
Teen Warned Not To Accept Group Chat Invites From National Security Advisors She Doesn’t Know

Teen Warned Not To Accept Group Chat Invites From National Security Advisors She Doesn’t Know

Teen Warned Not To Accept Group Chat Invites From National Security Advisors She Doesn’t Know

26.03.2025 15:00 β€” πŸ‘ 46072    πŸ” 10162    πŸ’¬ 356    πŸ“Œ 520
Preview
BOILER ROOM Connecting club culture to the wider world, on screen and through parties, film and video.

We’re about to open up some roles for boilerroom.tv, let’s have a chat?

03.03.2025 15:44 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

You should know that a big part of 18F's work was to make sure multi-million to multi-*hundreds*-of-millions dollar contracts at fed *and* state level didn't go to shitty enterprise IT consultancies that *repeatedly* delivered tech that didn't work, was late, or didn't even do what it needed to

02.03.2025 18:03 β€” πŸ‘ 4680    πŸ” 1209    πŸ’¬ 58    πŸ“Œ 82
panel 1: your shell has a history of the commands you ran

some ways to access history:

* press the up arrow
* run history
* search it with Ctrl-R (in bash/zsh)

panel 2: how long does your shell store history for?

in bash, the default is 
500 commands (not enough!)

in fish, the default is 
256,000 commands

if you're using bash, you might want to configure it to store more history

panel 3: when does your shell save history?

by default, bash and zsh only save history to a file when you exit the shell

fish saves the history continuously

panel 4: where is history stored?

bash: .bash_history

zsh: run echo $HISTFILE

fish: mine is in ~/.local/share/fish/fish_history

person (thinking): β€œsometimes I copy over my shell history when setting up a new computer!”

panel 5: a useful history tool:  atuin

atuin lets you:

* save unlimited history
* search history more easily
* save commands as soon as you run them
* sync your history (optionally)

panel 6: gotcha: history in zsh only shows 15 entries

You can run history 0 to see all the history


panel 7: 

commands that start with a space don't go in your history. good for passwords!   

(might depend on your shell's config)

panel 1: your shell has a history of the commands you ran some ways to access history: * press the up arrow * run history * search it with Ctrl-R (in bash/zsh) panel 2: how long does your shell store history for? in bash, the default is 500 commands (not enough!) in fish, the default is 256,000 commands if you're using bash, you might want to configure it to store more history panel 3: when does your shell save history? by default, bash and zsh only save history to a file when you exit the shell fish saves the history continuously panel 4: where is history stored? bash: .bash_history zsh: run echo $HISTFILE fish: mine is in ~/.local/share/fish/fish_history person (thinking): β€œsometimes I copy over my shell history when setting up a new computer!” panel 5: a useful history tool: atuin atuin lets you: * save unlimited history * search history more easily * save commands as soon as you run them * sync your history (optionally) panel 6: gotcha: history in zsh only shows 15 entries You can run history 0 to see all the history panel 7: commands that start with a space don't go in your history. good for passwords! (might depend on your shell's config)

shell history

(with a shoutout to https://atuin.sh)

28.02.2025 21:23 β€” πŸ‘ 10    πŸ” 15    πŸ’¬ 2    πŸ“Œ 1

If you worked for 18F and got fired, Group together to start a consulting company.

It’s just a matter of time before DOGE needs you to fix the mess they inevitably create.

They will have to hire your company as a contractor to fix it. But on your terms.

I’m happy to invest and/or help

02.03.2025 00:34 β€” πŸ‘ 116689    πŸ” 20068    πŸ’¬ 3391    πŸ“Œ 1503
We're not done yet | 18F

I got laid off today, with the rest of 18F.

18F was an elite federal software shop. We made gov't websites work better, more efficiently for the American people. We saved taxpayers from getting screwed over by contractors. And were fired for it.

We made this website to tell our story:
18f.org

01.03.2025 22:38 β€” πŸ‘ 93533    πŸ” 31192    πŸ’¬ 3208    πŸ“Œ 1413
Preview
DOGE Is Hacking America The U.S. government has experienced what may be the most consequential security breach in its history.

Simple as this. foreignpolicy.com/2025/02/11/d...

12.02.2025 00:41 β€” πŸ‘ 1818    πŸ” 628    πŸ’¬ 38    πŸ“Œ 36
Preview
Wikipedia Prepares for 'Increase in Threats' to US Editors From Musk and His Allies The Wikimedia Foundation says it will likely roll out features previously used to protect editors in authoritarian countries more widely.

Wikipedia is rolling out anonymity features piloted in countries with authoritarian governments in the US & is making a change to not show editor IP addresses in response to a global "increase in threats" from Elon Musk, Heritage Foundation, and governments

www.404media.co/wikipedia-pr...

11.02.2025 15:06 β€” πŸ‘ 3490    πŸ” 1476    πŸ’¬ 37    πŸ“Œ 71

@samlanning.com is following 20 prominent accounts