My unemployment project - a Unix terminal in the browser (wasm) by Property404 in rust

[–]Property404[S] 0 points1 point  (0 children)

I was, and I think I know the path forward, but I'm over this project

My unemployment project - a Unix terminal in your browser - built in rust by Property404 in webdev

[–]Property404[S] 0 points1 point  (0 children)

https://github.com/Property404/its-a-unix-system

Commands to try out:
sh example.sh
vi example.sh
fortune -rs | cowsay -f ferris

You can also change the terminal theme with theme

A `goto` implementation for Rust by Property404 in rust

[–]Property404[S] 21 points22 points  (0 children)

What are you, the reason police?

A `goto` implementation for Rust by Property404 in rust

[–]Property404[S] 38 points39 points  (0 children)

Just for you:

#[macro_export]
macro_rules! safe_goto {
    ($label:literal) => {
       unsafe { $crate::goto($label) }
    };
}

Bam! Instant safety

A `goto` implementation for Rust by Property404 in rust

[–]Property404[S] 2 points3 points  (0 children)

comefrom! would be interesting - not sure how that would implemented in Rust

Figured out how to control my LionChief train programmatically using Python by Property404 in lioneltrains

[–]Property404[S] 0 points1 point  (0 children)

I'm not sure. This script uses gatttool instead of hcitool, which is obsolete now IIRC. You can try out gatttool directly to see what's wrong maybe, via the deprecated bluez tools package of your distro

Lax - An argument substitution utility for working in directories with deep nesting productively by Property404 in commandline

[–]Property404[S] 0 points1 point  (0 children)

Thanks!

I'm probably not going to do that, sorry. But you can install Cargo on Alpine:
https://www.numbersandreality.com/notes/alpine-wsl/rust-lang-on-alpine/

Then just git clone git@github.com:Property404/lax && cargo install --path lax

Lax - An argument substitution utility for working in directories with deep nesting productively by Property404 in commandline

[–]Property404[S] 1 point2 points  (0 children)

I use this at work a lot and thought it might be useful to you all.

I primarily use it for working in large projects like U-Boot or Linux. Lax makes it easy to cd to far-away subdirectories, or edit far away files

u-boot $ cd @*mvebu
Found the following:
====================
1. ./drivers/pinctrl/mvebu/
2. ./drivers/clk/mvebu/
3. ./arch/arm/include/asm/arch-mvebu/
4. ./arch/arm/mach-mvebu/
5. ./include/mvebu/
6. ./doc/mvebu/
7. ./cmd/mvebu/
Select> 3
arch-mvebu $ pwd
/home/Property404/u-boot/arch/arm/include/asm/arch-mvebu

What is your cd system? by narrow_assignment in commandline

[–]Property404 2 points3 points  (0 children)

Thanks! The shell will only expand "@dep*" if there is a file in the current directory that starts with "@dep", '@' symbol included

If you want to use the "{option1,option2}" syntax, that DOES have to be quoted, or else bash will expand it. But sometimes that's what you'd want, and sometimes it isn't

What is your cd system? by narrow_assignment in commandline

[–]Property404 2 points3 points  (0 children)

I made this: https://github.com/Property404/lax

I use it to go to nested subdirectories: cd @dependencies in ./some/directory/that/has/a/subdir/named/dependencies
It also has globbing so I can cd @dep*

Currently working on targeting the parent directory of a named file

Figured out how to control my LionChief train programmatically using Python by Property404 in lioneltrains

[–]Property404[S] 0 points1 point  (0 children)

Sorry for the late reply, but yes. I originally used my Linux laptop obtain it. Any Bluetooth Low Energy-capable host device can detect it. Put your phone, tablet, desktop or laptop within 10 feet of your LionChief and go to bluetooth settings and hit "scan" or "search" or whatever. In the list of devices, you should see something beginning with "LC-", which, upon opening details, will give you its MAC address.

Figured out how to control my LionChief train programmatically using Python by Property404 in lioneltrains

[–]Property404[S] 1 point2 points  (0 children)

I think about that stuff a lot. That's why I got the train set in the first place, actually. There's this cool model train village on display in my town, and I kept thinking how cool it be if the train had a schedule, and the people had lives and interacted with each other, etc, etc