Hacker Public Radio

Hacker Public Radio

Hacker Public Radio is an podcast that releases shows every weekday Monday through Friday. Our shows are produced by the community (you) and can be on any topic that are of interest to hackers and hobbyists.

Episodes

  1. 3d ago

    HPR4690: Playing Civilization V, Part 14

    This show has been flagged as Clean by the host. In our sample game we look at playing as Austria and aiming for a Diplomatic Victory. And our focus is on puppeting City-States, but I misunderstood and instead of making a Diplomatic Victory easier, it makes it harder. I still managed to get my Diplomatic Victory, but a Science or Domination Victory would definitely have been easier in this scenario. Playing Civilization V, Part 14 Now I am at turn 340, I just puppeted another City-State, and I have one more on the way. I have sent a large number of military units, both land and sea, to the City-States that are on Japan’s border. If he tries anything now he will likely regret it. Now I am starting to build things I had not bothered with before, like Granaries and Amphitheaters. I got a couple of Great Engineers, and used them to rush build Wonders. I am nearly finished puppeting all of the City-States, and my Happiness and Income are both quite healthy. I am in such good shape I started to build the World’s Fair, which I initally proposed then ignored. At this point I only have one more City-State to puppet, then I will have puppeted every City-State in the game. So it is time to put my large income to use in other ways by giving gifts to the other players. I may want to get a few more votes on my side to get over the top in the World Leader vote when it happens. On turn 357 I completed the puppeting of all of the City-States in the game. Meanwhile, I am building up my Science and building Wonders as they become available. I didn’t build any in the early game because I had other priorities, but now I have a strong military, high income, and no other pressing needs. My score on the Leader Board is now double that of my nearest competitor which is still Japan. And their denunciation me of just expired with them taking no action. I used a Great Engineer to rush build the Porcelain Tower, earning me another Great Scientist, which I then used to build another Academy. At this point it is mostly a slog to the finish. Since I was so dominant and so wealthy I could afford to pursue a couple of other options just in case. One was a Science victory, which looked like a possibility, though it would be close. I had to be very focused in my Science Research. The other option was a Culture victory, and I had dominated two other empires culturally without half trying, and I was generating Great Artists, Great Musicians, and Great Writers pretty rapidly. So I built Museums, then Archeologists, and grabbed every artifact I find to stuff into the Museums. But the final Victory came when I researched Globalization. This tech allows you to get an extra vote in a World Council for every Spy you send to another empire’s capital and designate as an Ambassador. I immediately sent my spies out (they had previously been in my cities doing counter-espionage since I had a tech lead). And a few turns later a vote for World Leader came up and I won. This was my first time using Maria Theresa of Austria as my leader, and it was fun, but in the end puppeting all of the City-Staters actually made it harder to win a Diplomatic victory. In other games I have played, every City-State that was an ally was an extra vote in the World Council, and I assumed that making them puppets would mean I would get that many votes. But that didn’t happen. Of course, if I had read more carefully in the Civilization Wiki I would have realized this, because it says there very clearly that Austria is one of the worst Empires to pick if you are going for a Diplomatic victory. So the fact that I managed it anyway is nice. I think I actually could have done a Science victory as I had my Spaceship half-built when I won the Diplomatic Victory. But I hope this analysis of how I actually played this game will be helpful to someone else. Links https://www.palain.com/gaming/civilization-v/playing-civilization-v-part-14/ Provide feedback on this episode.

  2. 4d ago

    HPR4689: Cheap Yellow Display Project Part 8: Writing the code

    This show has been flagged as Clean by the host. Hello, again. This is Trey. Welcome to part 8 in my Cheap Yellow Display (CYD) Project series. If you wish to catch up on earlier episodes, you can find them on my HPR profile page https://www.hackerpublicradio.org/correspondents/0394.html It is hard to believe that I started this project and the HPR series to document it more than a year ago. Time flies. Life happens. I spent the last 8 months so focused on work related activities that I had to set the project aside. And once I set it aside, it was difficult to get back to again. The one time I tried, I found that my son's old Windows laptop, which I had commandeered to use for the project, was once and truly dead. We live in a different world now than we did when I began this project. Today, everything is about AI – how it is changing our world, increasing efficiencies, and even displacing certain types of jobs. "Vibe coding" is transforming the way we make software, and now everyone is a developer. Within my organization, we are all being strongly encouraged to learn more about AI and apply it in our daily work. We are blessed to have access to a wide range of training and to powerful tools which support the process. Several colleagues within my organization and outside my organization have recommended Claude Code -- for development, for organization, for brainstorming, and for much more. My role is not that of a developer, and I have had no need for Claude Code at work. There are plenty of other tools for me to use. But at home, I thought... I could install Claude Code at home to experiment with and to learn. And then it hit me. I wonder if I could use Claude Code to help me with my stalled CYD project. "Hello, my name is Trey, and I am a fraud." OK. I don't think I am a fraud, but having never used such a powerful tool to help me code, I feel a little bit like a fraud, with Claude doing the work for me. Let's talk through what we did. As I mentioned, I was unable to use the laptop on which I created the original GUI code. But no worries, because It was all on GitHub, right? So, I began by trying to install Claude Code on one of my Ubuntu machines. That failed miserably, and all the instructions I found online recommended running it on Windows. So I transitioned to installing Claude Code on a freshly built Windows 10 system using some old hardware which will not support Windows 11. Surprisingly, It seems that Claude wants to run within Ubuntu on Windows Subsystem for Linux (WSL). Once I went through all the hoops for installing and setting up my basic subscription, I got to work. I created a new directory to use for all my project files, and another one for Claude to write all its output files to. Everything I have read and heard about using Claude Code for a project like this recommended beginning by using Claude to create the project plan. So my first prompt was as follows: "I am building a project using an ESP32 cheap yellow display. The final goal is to have a device with a graphical user interface which will allow me store several text messages, each assigned to their own specific button. Then, when one of the buttons is pressed, the message will be converted into morse code, and the message will be sent by blinking an onboard LED. I already have the initial design for the GUI coded in my github repository. Please construct a detailed step by step plan for building this application" I wanted to keep it simple at the beginning, so even though I plan to use an opto-isolated relay for the output, I am starting out using the built in LED. Claude asked me for the URL for my Github repository, and I provided it. After thinking for a bit, it produced a project plan. CYD Morse Sender — Step-by-Step Build Plan What You Already Have - 3 fully designed LVGL screens (Send, Config, Keyboard) - 7 send buttons with green styling on the Send Screen - Speed slider (5–30 WPM) and program slot dropdown on Config Screen - Text area + LVGL keyboard widget on Keyboard Screen - Display driver and touchscreen hardware initialized (but touch read was stubbed out) --- Phase 1: Fix Touchscreen Input Initialize the XPT2046 on VSPI, replace the hardcoded touched = false with real touch data, calibrate raw ADC coordinates to screen pixels, and verify all three nav buttons transition screens correctly. Phase 2: Persistent Message Storage Use Preferences.h / NVS to store 7 messages ("msg0" – "msg6") that survive power cycles. Load on boot and populate send button labels. Phase 3: Config Screen — Slot Selection & Speed Wire the Program dropdown to g_selectedSlot, wire the Speed slider to g_wpm with a live WPM label, and wire the Set button to clear the text area and navigate to the Keyboard Screen. Phase 4: Keyboard Screen — Capture and Save Text On keyboard OK (LV_EVENT_READY): read the text area, save to NVS, update the send button label, navigate back. On Cancel: navigate back without saving. Phase 5: Morse Code Engine Build morse.h with the full A–Z / 0–9 lookup table, a textToMorse() converter, and Paris-standard timing (unit_ms = 1200 / wpm). Phase 6: Non-Blocking LED Transmission State machine (IDLE / LED_ON / LED_OFF) driven by millis() in a morseUpdate() function called every loop — no delay(). LED on GPIO 17 (blue). Phase 7: Wire the Send Buttons Each button calls startMorse(getMessage(slot)) if not already transmitting. Disable all send buttons during TX; re-enable when the state machine reaches the end. Phase 8: Integration & Polish Stop button, WPM persistence, empty-slot guard, serial debug output, final touch calibration, end-to-end test checklist. --- Recommended order: Phase 1 → 2 → 7 (partial) → 5 → 6 → 7 (full) → 3 → 4 → 8 This was wild! Claude determined exactly how far along I was in the project, and also alerted me to the fact that the "touch read was stubbed out". Ugh. This means that the files I had uploaded to GitHub were my original GUI files (Episode 05 – HPR4532 - https://hackerpublicradio.org/eps/hpr4532/index.html ) and not the ones that I finally got working properly (Episode 07 – HPR4624 - https://hackerpublicradio.org/eps/hpr4624/index.html ). That was my own fault. Did I mention that I don't get Git? I REALLY need to learn to properly use Git! But, we have a plan, broken down by eight numbered phases. And they seem to address all the functionality I wanted with a few additional things I had not thought about. Interestingly, even though these phases are sequentially numbered, Claud recommended that we approach them in a bizarre order: Phase 1 → 2 → 7 (partial) → 5 → 6 → 7 (full) → 3 → 4 → 8 . Alright. Let's see what we can do. The first phase is to fix the touchscreen input. Claude took me through it step-by-step, asking as it needed to read specific project files. Finally, it wrote a new ui.ino code file to my speficied output directory for me to test. I copied it into the correct file location, said a quick prayer, compiled in Arduino IDE, and downloaded to the CYD. Well, that is... interesting. The display looked nothing like it was supposed to. There were vertical green bars with smaller dashed green vertical stripes in them. I will include a picture in the show notes so that you can see what it looked like and why it was so difficult to describe. I spent the next hour or so trying to explain what I was seeing to a chat bot. Claude recommended potential fixes which either did nothing or made the situation worse. I began questioning whether this was a good idea, how people actually gained efficiencies talking to a bot, and even several life choices. Then I had a thought. I prompted Claude: If I were to take a picture of the screen on the cheap yellow display and copy it into the output folder, would you be able to analyze it to better determine what is wrong and how to fix it? Shockingly, Claude answered in the affirmative, and told me to copy the picture to the output folder and let it know when to proceed. It analyzed the picture and more of the supporting files it had copied from my GitHub, asking each time if it could access that file. It determined that my original code was written for a flavor of LVGL version 8 and I was now using LVGL 9.5. It recommended changes, and then asked permission to make those changes, file by file. .h files & .c files, Finally, I just gave it permission to edit the files in the project folder without asking for permission for each file each time. Claude was still explaining each change, showing me exactly what would be changed, and asking for permission, so that I could review all of the changes. But now it was not asking additional permission to write to each of the impacted files. Next, Code compiled and downloaded. Different screen, but not right. Again, I took a picture and gave it to Claude to analyze. So, Claude paused and altered the code to generate a specific test pattern overtop of the GUI. The test pattern was supposed to cover the entire rectangular screen. But parts of the pattern were in a square on the screen and parts were not. Another photograph and analysis, told Claude that there were some rotation/screensize issues. We repeated this several times. Some resulted in improvement, and others did not.

  3. 5d ago

    HPR4688: Downloading Podcasts with a Shell Script

    This show has been flagged as Clean by the host. 01 Introduction In this episode I will describe techniques for downloading podcasts using basic shell commands such as wget. I will illustrate this using a bash script that can be used to download HPR podcasts. Even if you do not have any interest in downloading your podcasts using this method, you may find some of the methods useful or interesting. It is the principles that are discussed here that are important, rather than the implementation. 02 I realize that there are already a number of different podcast download programs available, including at least one written in bash. However, you may feel that none of these suit how you wish to do things and want to create your own system tailored to your specific needs. If so, then I hope the following is of some use to you. If not, then you may still find some of the things discussed here to still be of interest. Some of the subjects I cover include wget to a user defined file name. parsing xml with xmllint. using inotifywait to trigger an action when a file is created or modified. using notify-send to send a message to the notification area. and a way of allowing a cron job to send a message to the user interface. 03 Background There has been an ongoing discussion in comments to some HPR episodes about problems downloading HPR podcast episodes. Apparently some people have been experiencing problems with the way the episode URLs are structured. 04 I am afraid that I don't fully understand the nature of these problems, so I won't be addressing that problem directly. Instead, I will present a bash script that I have written which can be used to download HPR podcasts. This bash script can be run using cron to automatically fetch new HPR podcasts and save them to a designated directory. This is a simplified version of a script that I have used for years to download HPR and other podcasts. 05 I won't try to read the full bash script out in this podcast, as that would be a bit dull to listen to. I will instead describe what each section does and why I chose to do things that way. Perhaps other people can offer suggestions of better ways to do things. I will post the full bash script in the show notes. 06 Fetching Podcasts The standard way of distributing podcasts is to publish an RSS feed containing URL links to the audio files. RSS is a very long established and widely supported mechanism for this and other purposes. An RSS feed is basically an XML document which can be accessed over HTTP. These URLs contained in the RSS XML document can then be used to download the actual audio files, such as MP3 or OGG files. 07 Basically what we need to do is the following • Download the RSS XML document. • Extract the URL links to the audio files. • Compare the list of these links to a previously saved list to see which ones are new and which ones are ones that we previously downloaded. 08 • Make a list of the new URLs. • Go through this list of new URLs and download each of the new audio files. • Check to see that we actually received the new audio file. • Add the URLs of the files we successfully downloaded to our saved list of podcast URLs 09 In addition to this, we would like to have the above happen automatically in the background without our having to take any action on our own. We may wish to receive a notification of when a new podcast has arrived however. We would probably also wish to receive notification of any errors or failures. 10 Fetching Podcasts - The Preliminaries Our desire to be able to run the script automatically imposes some requirements on our solution. To schedule the script we will use cron. Cron is a Linux facility to run scripts on a schedule. 11 One of the side effects of using cron however is that we need to specify the full path to the locations where we intend to keep any data files, plus also the full path to where we intend to put the downloaded podcasts. 12 So the first thing we need to do in our script is to specify a number of different values for things like file location, the URL for the HPR RSS feed, and several other things as well. I will skip over the details of these, although I may make reference to them later. 13 Get the RSS Data The first thing of real substance to do is to fetch the current RSS feed data. I have put this in a bash function called getrssurldata The contents of this function are a one liner, but with a number of elements chained together through pipes. 14 Downloading the RSS XML Document • First we use wget, which is a standard command on most Linux distros. • We specify four things. • First we set a timeout. I have chosen 20 seconds. • Next we set the retry limit. I have chosen 3. 15 • Then we specify that the output of wget is sent to stdout rather than saved as a file. • This is done by using the -O option followed by a space and then a dash. • The O option is usually used to specify a file to save the output to, but when used with a dash causes output to go to stdout. • Then we specify the URL of the HPR RSS feed. 16 Contents of the XML Document This gives us the HPR RSS XML document. There are about 5,000 lines in this RSS document. Most of those lines are the show notes which are also included in the feed. 17 Extracting the Podcast Episode URLs There are only 10 lines of the document that contain information that we are interested in however. These lines are enclosed in "enclosure" XML tags. We just need to find those lines and separate out the URLs 18 Standard Command Line Tools There are two ways that we can do this. One is to use a combination of grep, sed, and cut. Grep can find the lines containing the enclosure tags. Sed and cut can extract the URL from the surrounding extraneous data. 19 However, this method does not discriminate between real enclosure tags in the data portion of the RSS feed and enclosure tags in the show notes which are included in the feed from episodes such as this one. This may be an acceptable problem in practical terms, but we can do better. 20 Using an XML Parser The other method is to actually parse the XML document. there are at least two command line XML parsers that I am aware of. These are "xmllint", and "xlmstarlet". I have used xmllint in this example. I have not used xmlstarlet, so I can't offer any comment on how easy or difficult to use it is. 21 I won't give a detailed explanation of all the things that xmllint can do. It has many features, most of which, as the name suggests, have to do with finding formatting problems with the XML itself. Describing everything it can do would be at least one episode in itself. I will instead just give the particular command used and explain each element of it. 22 In this example assume that we are piping the output of wget directly into xmllint. The complete command is xmllint --xpath "//channel/item/enclosure/@url" - | cut -d'"' -f2 23 In this example, xmllint is the name of the command. --xpath tells it to parse the document according to the string which follows. "//channel/item/enclosure/@url" tells it to find a series of tags in the hierarchy of channel, followed by item, followed by enclosure, and then extract the url attribute from the enclosure tag. The "-" which follows tells it to look for input from stdin rather than from a file. 24 The result is a string which has the url attribute name, an equal sign, and the URL that we want enclosed in quotes. To get just the URL itself, we pipe the output from xmllint into cut, using the doublequote characters as delimiters. We then save the result in a temporary file. 25 Finding the New Episodes Next we wish to find the new podcast episodes. Each HPR episode is identified by a unique URL. This means that if we save the URLs of episodes that we have already downloaded, we just have to look for the URLs that do not appear in this saved list. https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr4659/hpr4659.mp3 26 The easiest way to do this is to take our two lists of URLs, sort each into temporary files, and then compare the sorted URLs using the "comm" command. 27 This is simple, but has a drawback. Some podcasts occasionally change distributors. When they do this, the old podcasts are re-published with new URLs and you end up downloading a lot of old episodes over again. 28 With HPR we could get around this by extracting just the file name and looking for that instead of the full URL. I will however leave that problem as an exercise for the student and just accept that if the URL format changes we may end up downloading old episodes over again. Since the feed has a maximum of only 10 episodes in it however, that isn't really that big of a problem. It would be more of a problem with podcasts which have very large numbers of episodes in their feed, but the solutions to those will be feed specific. 29 Downloading the New Podcasts We should now have a list of URLs for the new podcasts we do not already have. Typically this should be only one file, but there could be several, or even as many as 10, if we have not turned on our computer in a while. Therefore, we need to iterate through the file of new podcast URLs and download each one. 30 Before we do that however, we should check to see if there is in fa

  4. 6d ago

    HPR4687: UNIX Curio #11 - Merging Files

    This show has been flagged as Clean by the host. ether This series is dedicated to exploring little-known—and occasionally useful—trinkets lurking in the dusty corners of UNIX-like operating systems. I frequently find myself reaching for the cut utility when writing scripts to extract one piece of data from a line, or to select specific fields from a log file. While I am familiar with its counterpart, paste , I don't employ it very often because I don't typically need its functionality. This perhaps has to do with the fact that I rarely work with text files containing lists. For shorter lists, I usually end up using a spreadsheet and for larger ones, a relational database. Both are valuable tools with their own strengths and weaknesses, but it is good to also know about standard utilities for working with lists. After uploading UNIX Curio #8 ( HPR episode 4657 ), I felt like maybe I had been too dismissive of the comm utility in that episode and should talk more about tools that are useful when managing lists. I don't frequently find myself using paste 1 , but can explain how it works. Briefly, it is a rough opposite of cut —when given multiple files as arguments, it assembles the first line from each one separated by tabs, then the second line, and so on. Instead of tabs, a different delimiter can be chosen with the -d option. Another option is -s , which swaps rows and columns so that the contents of each named file would appear on one line. While paste itself doesn't qualify as a UNIX Curio in my opinion, there is one feature that does: a hyphen can be given as an argument multiple times. In this special case, the output is taken line by line from standard input, but is spread across as many columns as there are hyphens. Example of using paste to turn the output of ls into columns. Because these columns are separated by tabs, they don't necessarily line up when a filename is eight or more characters long. The -1 is not required for the second ls command since that behavior is implied when output isn't going to a terminal. The -C option to ls usually gives nicer-looking output on a terminal—also, it lists in ascending order down by column. (Most implementations default to -C when output goes to a terminal.) If you want items ascending along rows like the paste example does, try ls -x instead. $ ls -1 /proc/net anycast6 arp bnep connector dev dev_mcast dev_snmp6 fib_trie fib_triestat hci icmp icmp6 if_inet6 igmp igmp6 ip6_flowlabel ip6_mr_cache ip6_mr_vif ip_mr_cache ip_mr_vif ip_tables_matches ip_tables_names [...35 more entries not shown...] $ ls /proc/net | paste - - - - anycast6 arp bnep connector dev dev_mcast dev_snmp6 fib_trie fib_triestat hci icmp icmp6 if_inet6 igmp igmp6 ip6_flowlabel ip6_mr_cache ip6_mr_vif ip_mr_cache ip_mr_vif ip_tables_matches ip_tables_names ip_tables_targets ipv6_route l2cap mcfilter mcfilter6 netfilter netlink netstat packet protocols psched ptype raw raw6 rfcomm route rt6_stats rt_acct rt_cache sco snmp snmp6 sockstat sockstat6 softnet_stat stat tcp tcp6 udp udp6 udplite udplite6 unix wireless xfrm_stat $ ls -C /proc/net anycast6 if_inet6 l2cap rfcomm tcp arp igmp mcfilter route tcp6 bnep igmp6 mcfilter6 rt6_stats udp connector ip6_flowlabel netfilter rt_acct udp6 dev ip6_mr_cache netlink rt_cache udplite dev_mcast ip6_mr_vif netstat sco udplite6 dev_snmp6 ip_mr_cache packet snmp unix fib_trie ip_mr_vif protocols snmp6 wireless fib_triestat ip_tables_matches psched sockstat xfrm_stat hci ip_tables_names ptype sockstat6 icmp ip_tables_targets raw softnet_stat icmp6 ipv6_route raw6 stat $ ls -x /proc/net anycast6 arp bnep connector dev dev_mcast dev_snmp6 fib_trie fib_triestat hci icmp icmp6 if_inet6 igmp igmp6 ip6_flowlabel ip6_mr_cache ip6_mr_vif ip_mr_cache ip_mr_vif ip_tables_matches ip_tables_names ip_tables_targets ipv6_route l2cap mcfilter mcfilter6 netfilter netlink netstat packet protocols psched ptype raw raw6 rfcomm route rt6_stats rt_acct rt_cache sco snmp snmp6 sockstat sockstat6 softnet_stat stat tcp tcp6 udp udp6 udplite udplite6 unix wireless xfrm_stat The paste command has limitations—the files you give it must all be already arranged in the same order, and if any file is missing a value, it must have a blank line so that subsequent lines will match up correctly. The files do not necessarily have to be sorted alphabetically, but whatever order they are in has to be the same. Check out HPR episodes 962 and 4201 for some more background on the paste utility. Example of using paste with files where some values are empty. Bob works from home so doesn't have an office assigned, and the laboratory Carol works in doesn't have a phone. This relies on the fact that the same line number in every file relates to the same person/entry. $ cat names Alice Bob Carol Dave $ cat offices 203 Lab6A 117 $ cat phones +1 212-555-1234 +1 919-555-2345 +1 212-555-1278 $ paste names offices phones Alice 203 +1 212-555-1234 Bob +1 919-555-2345 Carol Lab6A Dave 117 +1 212-555-1278 Our second UNIX Curio for today is a utility called join 2 , which has a bit more sophistication. It operates on two files, which can have multiple columns, and combines them using the join field. By default, the first column/field in each file is the join field, and only entries that exist in both files are printed. The -1 and -2 options can be used to join on a different field, and -o selects specific fields to be output. To make it so lines with missing entries also appear, you need to use the -a option, but an actual empty string with separator won't be printed unless -o is also present and includes the field. The default field separator character is one or more "blanks" in the current locale—for the POSIX locale, this means a space or a horizontal tab. The -t option selects a different character and also removes the treatment of multiple occurrences as a single separator, making it possible to have an empty field in one or both of the files. By default, a single space is used to separate fields in the output. If -t is given, the same character is used for separating fields in both input and output. You would need to pipe output through another tool like tr if you wanted to have a different separator in the output. The join utility might be an improvement over paste in some cases, since the join field makes it a little easier to identify which entries match up across files. It is limited to operating only on two files (one of which can be standard input), so combining more than that requires either creating temporary intermediate files or chaining together join commands in a pipeline. Another requirement is that all files must already be sorted in the current locale. Example showing how join can be used with two tab-separated lists. The LC_ALL assignment forces join to sort using the C (POSIX) locale instead of whatever might be set in your environment. The "@" on the header line has no special meaning; it is just there to make sure it sorts before any letters or numbers (in the C locale; it might not in other locales). Note that if -t were not specified, plist would be treated as having three fields because of the space separating the country code from the rest of the phone number. $ export tab="$(printf '\t')" #To more easily use tab characters below $ cat olist @Name Office Alice 203 Carol Lab6A Dave 117 $ cat plist @Name Phone Alice +1 212-555-1234 Bob +1 919-555-2345 Dave +1 212-555-1278 $ LC_ALL=C join -t "$tab" olist plist @Name Office Phone Alice 203 +1 212-555-1234 Dave 117 +1 212-555-1278 $ LC_ALL=C join -t "$tab" -a 1 -a 2 olist plist @Name Office Phone Alice 203 +1 212-555-1234 Bob +1 919-555-2345 Carol Lab6A Dave 117 +1 212-555-1278 $ #By default, join acts as if empty fields don't exist; use -o to include $ LC_ALL=C join -t "$tab" -a 1 -a 2 -o 0,1.2,2.2 olist plist @Name Office Phone Alice 203 +1 212-555-1234 Bob +1 919-555-2345 Carol Lab6A Dave 117 +1 212-555-1278 $ #The -e option sets a placeholder to use for empty fields $ LC_ALL=C join -t "$tab" -e "(none)" -a 1 -a 2 -o 0,1.2,2.2 olist plist @Name Office Phone Alice 203 +1 212-555-1234 Bob (none) +1 919-555-2345 Carol Lab6A (none) Dave 117 +1 212-555-1278 The brief description for join is "relational database operator"—I won't dispute that, but in my view it offers far fewer capabilities than people would expect from today's relational databases. I would imagine that when most people think of those they have Structured Query Language (SQL) in mind, which offers a lot more flexibility and functions to operate on data. However, I can see how join could be suitable for simple operations. Our last UNIX Curio for today relates to the sort utility 3 . While, as you might expect, it is well-known for its ability to sort data, it

  5. Jul 20

    HPR4686: Debugging Security Cameras: Firmware Updates, Python Scripts and Windows Workarounds

    This show has been flagged as Explicit by the host. Show Notes Episode Overview Operator kicks off the episode feeling under the weather but shares a quick tip for making perfect egg drop soup before diving into his main project: diagnosing why his front-door security camera stopped sending alerts and recording events. What follows is a live-debugging session covering network config, script logging, Windows permission hacks, NTP time drift, and firmware flashing. Key Topics & Breakdown Egg Drop Soup Hack: How to get that perfect ribbony texture by creating a boiling swirl before pouring in the eggs, plus broth-to-egg ratio tips. Camera Setup & Network Config: Using static DHCP via MAC address binding on a UniFi Dream Machine (UDM) for local domain resolution instead of hardcoding IPs. Python & Cron Automation: Running a custom Python script every 2 minutes to check for new recordings, parsing logs with grep -v , and navigating massive log files in vi . Windows Troubleshooting Tangent: Deleting the stubborn Windows.old folder using the TrustedInstaller service hack ( ExecTI.exe ) instead of taking ownership manually. Time Sync & Firmware Quirks: Discovering the camera's system clock was stuck in 2011/2026, causing missed events. Downloading firmware via a slow third-party link, renaming .bin to .zip , and extracting with 7-Zip. Pre-Flash Backup Routine: Exporting camera configuration before upgrading, storing it in Google Drive for searchable documentation, and clearing old log/trigger files to reset the event pipeline. ️ Tools & Techniques Mentioned crontab + Python scripts for automated monitoring grep -v , cat , tail , and vi (line navigation with :1000 ) Obsidian for note-taking & AI assistant integration Firefox/Playwright for headless browser testing Turbo Download Manager & Bolt Media Downloader for multi-threaded/sniffing downloads 7-Zip for archive extraction Google Drive for searchable config backups Resources & Links Python API Script: Uniview IPC3628SR Recording Checker Camera Model: IPC3628SR (Uniview Wyze ISP Warm Light Deterrent Network Camera) TrustedInstaller Run-as Tool: ExecTI TrustedInstaller Runner Quick Takeaways Always verify NTP/time sync on IoT cameras before troubleshooting missed events or alerts. Use grep -v "noise" to quickly filter out repetitive log entries when debugging automation scripts. Windows system folders can be stubborn; running commands as TrustedInstaller bypasses hidden file locks without manual ownership changes. Always export and back up device configs before flashing firmware, even if the upgrade seems straightforward. Third-party download links often use temporary tokens or .bin wrappers; renaming to .zip and verifying with 7-Zip can save headaches. Thanks for listening! Stay curious, keep your logs clean, and remember: defense in depth starts at home. Example trusted installer hack # Shhhh I can't IR ... Defender, ForcePoint, SMS Agent Host ...I just can't anymore ... sc config TrustedInstaller binPath= "Reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Sense" /v Start /t reg_dword /d 4 /f" sc start "TrustedInstaller" sc config TrustedInstaller binPath= "Reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Fppsvc" /v Start /t reg_dword /d 4 /f" sc start "TrustedInstaller" sc config TrustedInstaller binPath= "Reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CcmExec" /v Start /t reg_dword /d 4 /f" sc start "TrustedInstaller" sc config TrustedInstaller binPath= "Reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinDefend" /v Start /t reg_dword /d 4 /f" sc config TrustedInstaller binPath= "C:\Windows\servicing\TrustedInstaller.exe" Provide feedback on this episode.

  6. Jul 16

    HPR4684: Sim Racing on the cheap!

    This show has been flagged as Clean by the host. Thrustmaster TMX Force Feedback Pro Black Xbox One / Xbox Series X/S / PC https://www.ebay.com/itm/157554569422 Dayton Audio DAEX25 Audio Exciter Pair - Sound Exciter Pair Audio Transducer - 5 Watts RMS, 8 Ohms Impedance - 2 Pack - Turn Any Surface into a Speaker System https://www.amazon.com/dp/B001EYEM8C https://www.simhubdash.com/ https://www.accsetupcomparator.com/ https://www.iracing.com/ ( they have buy 2 years get discount during holiday but still can't afford it .. ) https://forza.net/horizon DiRT Rally 2.0 GOTY https://k4g.com/store?distribution[]=3&q=DiRT%20Rally%202.0%20GOTY&sort=price CrewChiefV4 https://thecrewchief.org/ https://app.tracktitan.io/sessions/3ebbf63b-93de-4309-9a42-9311a745209d/20241228052252 SUMMARY. User discusses sim racing challenges, costs, and setup tips. IDEAS. Sim racing requires time and investment. I Racing is expensive with annual costs. Set of Courses offers one-time payment. Proper setup enhances sim racing experience. Cable connections can complicate setup. Upgrading hardware improves performance. Arcade games like Forza offer casual play. Realistic sim racing demands dedication. License requirements vary between platforms. Remote gaming systems save space. Steering wheel upgrades improve smoothness. Dedicated spaces optimize sim racing. Balancing fun and realism is key. Multi-launchers manage gaming platforms. Hacked accounts may cause issues. Monitoring hardware wear is important. Shifting mechanisms enhance control. Curved monitors improve immersion. Time constraints affect sim racing participation. Exploring multiple games adds variety. RECOMMENDATIONS. Consider Set of Courses for a one-time payment. Invest in a proper setup for serious sim racing. Use a multi-launcher for managing games. Upgrade hardware for smoother performance. Buy specific tracks and cars to avoid costs. Opt for a dedicated space for sim racing. Check for license requirements before purchasing. Remote into gaming systems to save space. Replace plastic parts with bearings for smoother operation. Use a 7-speed shifter for better control. Avoid hacked accounts for reliability. Purchase multiple accounts for different players. Focus on arcade games for casual play. Prioritize a curved monitor for immersion. Use a standing desk for accessibility. Monitor cable connections to prevent setup issues. Upgrade steering wheel components for better experience. Balance fun and realism based on personal preference. Consider time investment for sim racing. Explore different racing games for variety. Provide feedback on this episode.

  7. Jul 14

    HPR4682: Behind the Keyboard: A Cybersecurity Operator’s Real-World Workflow

    This show has been flagged as Explicit by the host. SUMMARY The presenter outlines a practical cybersecurity workflow, covering ergonomic setups, browser isolation, virtual machine troubleshooting, AI-assisted scripting, and network tunneling methods utilized during active security assessments. ONE-SENTENCE TAKEAWAY Isolate browser environments, utilize automation scripts, and verify network paths before starting security tests to avoid workflow interruptions. TOOLS Talon Voice – Open-source voice recognition software enabling hands-free computer control and command execution. Obsidian – Local-first markdown note-taking application supporting secure, AI-friendly knowledge management. AutoHotkey – Windows scripting utility for creating custom macros and remapping keyboard inputs. Chrome Debug Commands – Browser developer tools allowing direct inspection of extensions, cookies, and storage. Whisper Diarization – Audio processing script that separates speaker tracks and converts recordings to searchable text. Hyper-V / WSL – Microsoft virtualization platforms enabling isolated guest environments and Linux subsystem integration. OpenConnect / OpenVPN – Command-line tunneling clients used for establishing secure, split-tunnel network connections. Jamboree Framework – Portable PowerShell environment that dynamically provisions development tools without altering system paths. MOBA Portable – Feature-rich terminal emulator supporting static/dynamic tunnels, auto-reconnect, and embedded X-server capabilities. Nmap – Network discovery and security auditing tool utilized for comprehensive port scanning and service detection. 00:00:00 Ergonomic Workspace Configuration Configures physical workstation elements to reduce strain during extended testing sessions. Proper alignment prevents repetitive stress injuries while maintaining focus on technical tasks. Monitor Positioning – Displays should align with eye level to maintain neutral neck posture; the speaker notes their curved 49-inch screen sits slightly high due to chair adjustments. Split Keyboard Layout – Utilizes a Freestyle 2 mechanical keyboard, allowing natural shoulder-width arm placement and reducing wrist deviation during prolonged typing. Postural Adaptation – Acknowledges that ergonomic equipment requires matching body alignment; elbow rests should sit between hip and shoulder height for optimal leverage. 01:45:00 Voice Control & Note Synchronization Utilizes auditory input methods and localized knowledge bases to streamline documentation workflows. Separating secure work notes from casual observations prevents data contamination. Talon Voice Integration – Runs continuously to handle navigation, text entry, and application switching without manual keyboard interaction. Obsidian Migration – Transitions from cloud-based keep apps to local markdown files, enabling direct querying by local AI models while maintaining offline accessibility. Note Categorization – Divides information into secure work records and insecure personal logs, ensuring clean data pipelines for future retrieval and analysis. 03:50:00 Browser Extension Management & Security Isolation Separates web browsing activities from primary work processes to minimize attack surfaces. Running dedicated user profiles prevents plugin conflicts and credential leakage. Jailed User Accounts – Creates restricted system profiles that only launch the browser, isolating extensions from core workstation operations. Shared Folder Synchronization – Establishes a single directory path bridging work and browsing users, allowing seamless file transfers without cross-contamination. Extension Audit Process – Leverages Chrome debug commands to enumerate installed plugins, verifying functionality before deployment on target networks. 06:15:00 Training Optimization & Audio Processing Accelerates mandatory compliance viewing through speed manipulation and automated transcription. Converting video content into searchable text enables rapid information retrieval. Global Speed Control – Increases playback rates up to sixteen times normal speed, drastically reducing time spent on repetitive corporate training modules. Whisper Diarization Pipeline – Downloads video tracks, separates speaker voices, and generates timestamped transcripts for quick reference during assessments. Download Management – Employs multi-threaded swarm downloaders and classic turbo managers to handle bulk media retrieval without interrupting active workflows. 10:40:00 Virtualization & Network Tunneling Protocols Establishes isolated testing environments using Windows virtual machines while managing connectivity constraints. Proper session handling prevents unexpected disconnections during remote engagements. Enhanced Session Mode – A Hyper-V feature providing higher resolution and shared clipboard functionality; disabling it is required before initiating certain VPN clients to avoid routing conflicts. Split Tunneling Mechanics – Routes specific traffic through the virtual network while keeping local resources accessible, preventing complete internet loss during connection tests. Certificate Verification – Identifies self-signed SSL mismatches early in the process, documenting them as preliminary findings before proceeding with authentication steps. 15:30:00 Macro Automation & Input Remapping Remaps frequently used keyboard shortcuts to reduce physical strain and accelerate command execution. Running scripts with elevated privileges ensures reliable input registration across virtual environments. Caps Lock Repurposing – Converts the caps lock key into a primary modifier, assigning copy/paste functions to adjacent letters for faster workflow navigation. Physical Typing Macros – Simulates keystrokes with deliberate delays, allowing seamless data entry into restricted VM consoles that block standard clipboard operations. Administrator Execution Requirement – Highlights that macro scripts must run with elevated privileges to successfully inject inputs across different desktop sessions. 20:15:00 Portable Development Environments & Python Management Deploys lightweight scripting frameworks that dynamically provision necessary tools without modifying host configurations. Verifying package contents prevents dependency conflicts during testing. Jamboree Framework – A PowerShell-driven utility that downloads and configures development stacks on demand, resetting environment variables to maintain system cleanliness. NuGet Package Filtering – Queries Microsoft's repository API to retrieve specific Python versions, ensuring compatibility with legacy tunneling scripts. Binary Verification Process – Checks extracted archives for bundled pip.exe or pip3.exe executables, eliminating manual module installation steps during rapid deployments. 28:40:00 AI-Assisted Scripting & Debugging Workflows Generates and refines PowerShell functions through iterative conversational prompts. Validating AI output against actual system behavior prevents silent configuration errors. Vibe Coding Approach – Relies on continuous feedback loops with language models to draft, minimize, and debug automation scripts in real-time. Parameter Standardization – Enforces strict formatting rules for PowerShell commands, avoiding hardcoded paths and ensuring cross-environment compatibility. Temporary Storage Management – Monitors extraction directories to prevent disk saturation, redirecting large package downloads away from constrained system partitions. 35:10:00 Terminal Emulation & Advanced Tunneling Strategies Facilitates complex network routing through dedicated terminal applications. Configuring dynamic and static tunnels enables reliable reverse connections for remote assessments. MOBA Portable Configuration – Utilizes an INI-based tunnel manager that automatically maintains connections across changing IP addresses or Wi-Fi networks. Reverse Shell Routing – Establishes outbound channels back to the tester, then proxies all subsequent traffic through those connections for consistent monitoring. Proxy Chain Integration – Forces non-proxy-aware applications to route through Burp Suite or custom interceptors using Windows utility wrappers like Priboxy. 42:30:00 Final Connectivity Testing & Engagement Wrap-Up Executes comprehensive port scans to verify target accessibility before documenting findings. Acknowledging workflow detours ensures realistic time management during active engagements. Nmap Verification – Runs full-port scans with verbose output to confirm host responsiveness and identify open services prior to credential testing. Connection Refusal Documentation – Captures screenshot evidence of failed routing attempts, providing clear proof of network restrictions for client reporting. Workflow Reflection – Recognizes that exploratory debugging adds value but requires time boundaries; balancing thoroughness with engagement scope maintains professional efficiency. Provide feedback on this episode.

4.2
out of 5
34 Ratings

About

Hacker Public Radio is an podcast that releases shows every weekday Monday through Friday. Our shows are produced by the community (you) and can be on any topic that are of interest to hackers and hobbyists.

You Might Also Like