• 2 Posts
  • 207 Comments
Joined 3 years ago
cake
Cake day: July 1st, 2023

help-circle
  • It depends on the type of work. The proper length of copyright for books or films should long, about 20 to 25 years, because they remain relevant for longer. But software should be shorter, about 7 years.

    The purpose of copyright is to enhance the public domain, not to create a business model. How well is 75 year old software enhancing the public domain? If any software has even entered the public domain through copyright expiration, what use is that software today? At best it’s an archeological curiosity, but more likely it’s no use at all.



  • I’ve had to use these before, when I lived in a dormitory that had frequent false fire alarms. The fire exit stairs took us to a series of one-way locking doors, ending with a “Do not exit, alarm will sound” door. At that point, even if we felt like it might be a false alarm, we had no choice but to go through the door. The first several times, it set off a weak alarm, but did not appear to be wired into anything else in the building. After a few times, it stopped going off, I assume because its battery died. It’s nobody’s job to replace those batteries, so they stay dead.













  • I was getting marked as “away” in Microsoft Teams every day, even though I was working. I just wasn’t using Microsoft Teams, so it marked me as idle.

    I wrote this Autohotkey script after my boss started complaining. It clicks on Teams every 2 minutes:

    global running := 0
    
    ^+1::
    {
    	global running := 1
    	while running == 1
    	{
            CoordMode("Mouse", "Screen")
            oldx := 0
            oldy := 0
            MouseGetPos(&oldx, &oldy)
            prev_active := WinActive("A")
    
            Try
            {
                WinActivate("ahk_class TeamsWebView")
            }
            Catch TargetError as e
            {
            }
            CoordMode("Mouse", "Window")
            Send("{Click 80 40 Left}")
    
            Try
            {
                WinActivate("ahk_id " prev_active)
            }
            Catch TargetError as e
            {
            }
            CoordMode("Mouse", "Screen")
            MouseMove(oldx, oldy, 0)
    
            sleep(115000)
    	}
    }
    
    ^+2::
    {
    	global running := 0
    }
    
    

    It has the side effect of preventing my computer from entering screensaver/lock screen when I really am away.




  • chmod can do 95% of everything I’ve ever needed, just with the “user” and “other” category. Private files, public-readable files, public read-write files, programs I compile but anyone can run… all that is just in the “user” and “other” category of chmod.

    It gets 99% if you add the sticky bit (used on /tmp) and the “group” category. Serial ports are owned by root:dialout, and mode 660. To get serial port access, just add the user to the dialout group. For group assignments in college, each partner pairing had their own group they could use. Group work files were mode 660 so groups could edit each others’ work, but other groups couldn’t peek.

    For the last 1%, use setfacl. It does everything that explorer.exe’s security tab can do.