Welcome to Nick's Random Musings

Of course I don't know what I'm doing, what fun would that be?


Beautiful Bash Bits


meta
Nick Gully, Denver

With the bash shell, you can always recall and search the most recent commands with the command ‘history’. You can re-execute a previous command with Exclamation/Number, like ‘!42’ to run the forty second item.

movie bait


meta
Nick Gully, Denver
#film plexorama movie times in your area.
1.) Reboot	10:30	3:30	5:00
2.) Reboot	9:30	2:30	7:00
3.) Sequel	11:30	1:30	6:00
4.) Sequel	2:20	9:15	10:30
5.) Emmy bait		3:30	9:30 
6.) Reboot Sequel	12:00	2:00	6:00
7.) Podcast made script	6:00
8.) Sequel	1:30	2:30	7:30
9.) Car Ad	4:30	6:30	9:30
10.) Horror masking the inequities of our modern society	2:30 12:00a

Debian 11.6 bullseye on Raspberry Pi 3 with python3


meta
Nick Gully, Denver

I have a garage door I operate via a small raspberry pi with a solenoid wired to the normal garage door button. It mimics the action of pressing it. This is really nice for having access to operate the door even from my phone or smartwatch. Recently I realized it was running a very old version of Raspbian, and I wanted to update to a more up to date debian.

This makes for a interesting interaction between the nginx webserver, and getting a python script to access the GPIO ports of the pi. There are levels of security to traverse.

Python packages: gipod 2.2.20

Python script:

import gpiod
import cgi

form = cgi.FieldStorage()
action = form.getvalue('group')

print("Content-type: text/html\n\n")
print("Status: 200 OK\n\n")


with gpiod.Chip("/dev/gpiochip0") as chip:
     info = chip.get_info()
     print(f"{info.name} [{info.label}] ({info.num_lines} lines)")
import time

from gpiod.line import Direction, Value

LINE = 16

with gpiod.request_lines(
     "/dev/gpiochip0",
     consumer="blink-example",
     config={
         LINE: gpiod.LineSettings(
             direction=Direction.OUTPUT, output_value=Value.ACTIVE
         )
     },
) as request:
     request.set_value(LINE, Value.ACTIVE)
     time.sleep(1)
     request.set_value(LINE, Value.INACTIVE)
     time.sleep(1)

And you may have to make sure that other users (like www-data), can touch the /dev/gpiochip0 device.

sudo chmod a+rw /dev/gpiochip0

First crewed launches (updated 2024)


meta
Nick Gully, Denver

Gagarin (Vostok-K ~4 launches before crew)

Shepard (Mercury-Redstone ~3 launches)

Komarov (Soyuz 13 +5 launches)

Glenn (Mercury Atlas ~7 launches)

Komarov / Feoktistov / Yegorov (Voskhod ~3 launches)

Grissom / Young (Gemini Titan II ~10 launches)

Schirra, Eisele, Cunningham (Saturn 1B 4 launches)

Borman, Lovell, Anders (Saturn V 3rd launch)

Filipchenko / Rukavishnikov (Soyuz-U +10 launches)

Young / Lovell (Space Shuttle 1st launch )

Liwei (Shenzhou / Chang Zheng 2F 5th launch)

Douglas Hurley, Robert Behnken (SpaceX Falcon 9 / Dragon ~2 launches)

Butch Wilmore and Suni Williams (Boeing Starliner / Atlas V ~1 launch)

Spicy rock train


meta
Nick Gully, Denver

Spent fuel rods, possibly from a US Navy refueling, headed to Idaho.

Sent from my radio telephone. Baggage Baggage

« Older Posts