Sysadmin for a K-12 public school district in New Jersey. I’m level Super Fuzz in the movie quote game. Nice, right?
✍️Write rieview ✍️Rezension schreiben 🏷️Get Badge! 🏷️Abzeichen holen! ⚙️Edit entry ⚙️Eintrag bearbeiten 📰News 📰Neuigkeiten
“Oh, well, how do you measure yourself with other golfers?” 🎥
10.3.2025 14:30“Oh, well, how do you measure yourself with other golfers?” 🎥I need to filter out lines from a file that contain any of the following: 1/49, 1/50, 1/51, 1/52, 2/49, 2/50, 2/51, 2/52, 3/49, 3/50, 3/51, 3/52, 4/49, 4/50, 4/51, or 4/52. Here’s a regex that will match them.
.*(1|2|3|4|5)/(49|50|51|52).*
“I want me a PRS guitar, with the dragon inlay.” 🎥
27.2.2025 17:16“I want me a PRS guitar, with the dragon inlay.” 🎥“You, uhm, wanna come in ‘n’ sing some blues?” 🎥
20.2.2025 17:43“You, uhm, wanna come in ‘n’ sing some blues?” 🎥I used to have an AppleScript that would prompt me for some text and then append that to a file with a date and time stamp. The purpose of this script was to allow me to quickly log stuff that I was working on throughout the day. I launched the script with a keyboard mapping using FastScripts. I think I had it set to ⇧ + ⌘ + L.
At some point over the years and a couple of new computers later, I lost the script I found a copy of the script and recently became interested in adding this back into my workflow. Before I found it though, I used Kagi’s Quick Answer feature to cobble together a new version of the script.
set filePath to "Macintosh HD:Users:kevin:Documents:log.txt"
set isoDate to do shell script "date +'%Y-%m-%d %I:%M %p'"
try
-- Try to open the file for access
set fileRef to open for access file filePath with write permission
-- If successful, do something with the file
set userInput to ""
repeat until userInput is not ""
set userInput to text returned of (display dialog "What did you do?" buttons {"Cancel", "OK"} default button 2 default answer "")
end repeat
write return & return & "--- " & return & isoDate & return & return & (ASCII character 9) & userInput to fileRef starting at eof
on error errMsg number errNum
if errNum = -49 then
-- If the error is that the file is already open
close access file filePath -- Close the existing access
-- Now reopen the file
set fileRef to open for access file filePath with write permission
set userInput to ""
repeat until userInput is not ""
set userInput to text returned of (display dialog "What did you do?" buttons {"Cancel", "OK"} default button 2 default answer "")
write return & return & "--- " & return & isoDate & return & return & (ASCII character 9) & userInput to fileRef starting at eof
end repeat
else
-- Handle other errors
display dialog "An error occurred: " & errMsg
end if
end try
-- Close the file when done
close access fileRef
This is an improvement over my original script as it has better error handling and checks if the file is already open. I’m using Raycast as my launcher now and I’ve set it up to run this script by pressing the Hyper Key1 + L. I’m hoping to start using this regularly so I can have a good record of my work activites.
I still have the original log file that has entries going back 14 years, and it’s interesting to see what I was working on back then.
I mapped mine to the Caps Lock key. ↩︎
Solving in two guesses with only a single misplaced letter in guess one is like magic.
Wordle 1,333 2/6
⬛🟨⬛⬛⬛
🟩🟩🟩🟩🟩
“It’s 4:30, time for milking.” 🎥
6.2.2025 17:26“It’s 4:30, time for milking.” 🎥My last two movie quote posts were from Tom Hanks movies. That wasn’t intentional, but it emphasizes the quotability of those movies and how many of them I’ve seen multiple times.
1.2.2025 14:01My last two movie quote posts were from Tom Hanks movies. That wasn’t intentional, but it emphasizes the quotability of those movies...“I got in the short line once. It was for farm vehicles” 🎥
30.1.2025 18:51“I got in the short line once. It was for farm vehicles” 🎥“No. No, Mom. I’m not watching T.V. I…I’m practicing. I practicing.” 🎥
26.1.2025 14:22“No. No, Mom. I’m not watching T.V. I…I’m practicing. I practicing.” 🎥“So it’s sorta social. Demented and sad, but social, right?” 🎥
22.1.2025 20:22“So it’s sorta social. Demented and sad, but social, right?” 🎥“My hypocrisy goes only so far.” 🎥
16.1.2025 23:04“My hypocrisy goes only so far.” 🎥“I want to get one thing straight here, or I’m walkin’ too. I don’t work on January the 8th…cause that’s Elvis’ birthday.” 🎥
8.1.2025 18:19“I want to get one thing straight here, or I’m walkin’ too. I don’t work on January the 8th…cause that’s Elvis’ birthday.”...After a few days experimenting with Visual Studio Code, I’ve decided to continue using Sublime Text. It just fits my work style better.
4.1.2025 13:31After a few days experimenting with Visual Studio Code, I’ve decided to continue using Sublime Text. It just fits my work style...“Merry New Year!” 🎥
1.1.2025 12:24“Merry New Year!” 🎥The administration of a high school wants to disable the Google Chat service for some students.
A simple way to accomplish this would be to create a group named “no-chat” and set the Google Chat service to OFF for that group. However, in Google Workspace, services can only be set to ON for a group. It would be ideal if OFF could also be set, but that’s not currently possible.
Another option would be to create a new Organizational Unit (OU), set the service to OFF for that OU, and move the necessary users to it. While this approach works, it complicates the OU structure, which could become increasingly complex when future changes are required.
So, what is the best solution?
Set the Google Chat service to OFF for the “/student/HS” OU. Then, create a group named “HS-google-chat,” add all active high school users as members, and set the Google Chat service to ON for that group. Finally, remove the students for whom Google Chat should be disabled from the group.
This solution seems promising, but what happens when new students enroll in the high school or former students re-enroll? How can the “HS-google-chat” group remain up-to-date with all the students who should have Google Chat enabled?
The answer is to use GAM!
What I came up with is a 3-step process. The first step exports all the active users from the high school OU. The second step creates a new .csv file that removes any students that are listed in a nochat.csv file. The final step synchronizes the HS-google-chat group from the revised .csv file.
All of these steps are added to a Bash script and run as a cron job. Here is an example of the Bash script:
#! /bin/bash
export PATH=$PATH:/home/user/bin/gam7
export GAMCFGDIR="/home/user/GAMConfig"
# This exports all active users from the HS OU to a csv named HS_users.csv
gam redirect csv /home/user/GAMWork/HS_Chat/HS_users.csv print users query "orgUnitPath='/student/HS' isSuspended=false"
# This creates a new csv file named HS_chat_users.csv that is all the HS_users
# except users who are in the nochat.csv file
awk 'FNR==NR {a[$0];next} !($0 in a)' /home/user/GAMWork/HS_Chat/nochat.csv /home/user/GAMWork/HS_Chat/HS_users.csv > /home/user/GAMWork/HS_Chat/HS_chat_users.csv
# This syncs the HS_google_chat group with the users in the HS_chat_users.csv
# file
gam update group HS-google-chat sync members csvfile /home/user/GAMWork/HS_Chat/HS_chat_users.csv:primaryEmail
Currently, changing the users who should have Google Chat disabled requires manually editing the nochat.csv file. What I’d like to have it do is pull the list of students from a Google Sheet that is edited by the high school administration. That would give them control over which students don’t get Google Chat.
30.12.2024 22:29Disabling the Google Chat Service for Some StudentsI’m experimenting with using Visual Studio Code instead of Sublime Text.
28.12.2024 13:43I’m experimenting with using Visual Studio Code instead of Sublime Text.Cookie Clicker is on sale at Steam for $1.74. 🎮
23.12.2024 16:17Cookie Clicker is on sale at Steam for $1.74. 🎮“Y’all hear that? We’re usin’ codenames.” 🎥
9.12.2024 19:34“Y’all hear that? We’re usin’ codenames.” 🎥“All you got to do is go that way, really fast. If something gets in your way…turn.” 🎥
29.11.2024 22:01“All you got to do is go that way, really fast. If something gets in your way…turn.” 🎥I manage WiFi for 10,000 users across 11 locations, but somehow, I’m unable to get a decent connection in my family room at home.
28.11.2024 13:49I manage WiFi for 10,000 users across 11 locations, but somehow, I’m unable to get a decent connection in my family room at home.“Brothers don’t shake hands. Brothers gotta hug!” 🎥
27.11.2024 23:34“Brothers don’t shake hands. Brothers gotta hug!” 🎥“I know he can get the job. But, can he do the job?” 🎥
26.11.2024 23:06“I know he can get the job. But, can he do the job?” 🎥“I can think of three real good reasons why you shouldn’t do something like that, George. One, the Russian wheat harvest isn’t going to be as bad as everybody thinks. And two… And three, judging from all these jewels around your girlfriend’s neck here, I think you’ll need every penny you’ve got just to keep her happy.” 🎥
19.11.2024 22:41“I can think of three real good reasons why you shouldn’t do something like that, George. One, the Russian wheat harvest isn’t...Just added Blast Tyrant by Clutch to my collection. I love all their albums, but this one is my favorite. 🎵