Site Map - skip to main content

Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes every weekday Monday through Friday.
This page was generated by The HPR Robot at



Welcome to HPR, the Community Podcast

We started producing shows as Today with a Techie on 2005-09-19, 18 years, 8 months, 1 days ago. Our shows are produced by listeners like you and can be on any topics that "are of interest to hackers". If you listen to HPR then please consider contributing one show a year. If you record your show now it could be released in 15 days.


Latest Shows


hpr4121 :: RODE wireless microphones

My first recording on new a microphone

Thumbnail of Clinton Roy
Hosted by Clinton Roy on 2024-05-20 is flagged as Clean and released under a CC-BY-SA license.
recording, microphone, podcast. general. (Be the first).

Listen in ogg, spx, or mp3 format. Play now:

Duration: 00:08:42

All right. Well, good evening, hackers. My name is Clinton. And this is a very off the cuff episode for me just to announce that I've got a new microphone. So I just wanted to run through a couple of details of that. Make a show, say a little about the microphone while I got it. What I hope to do with it. So this is a roadie wireless go to setup. It comes with three little boxes. Roughly, roughly, you can fit each one of the little boxes inside a matchbox. So there are three of these that come with the set that I bought. Two of them are microphones that you clip onto your lapel. The third is a transceiver. So at the moment, I've got the transceiver on and I've got one of the microphones on. I bought this because I'm going to be going to a conference soon. And one of the things that I do try to do at conferences is to interviews with people. And this is kind of nice in that I can switch these two microphones on. Give one to myself. Give one to the person I'm interviewing. And I don't have to use a single microphone and shove it underneath their faces. And I don't have to swap the microphone between the two of us. The other feature, like the particular reason I've got this model is that each of the two microphone units actually has built in RAM. So it will actually record, like if you've got it set up in the mode, which I do, you can get each microphone to do a backup recording of your presentation. The regular mode for this set of microphones is to actually treat the transceiver as a source and plug it into computer or plug it into your camera as a external microphone. But it has this lovely mode, which I'm recording this particular episode to. We can just turn it on. It's not the transceiver is not plugged into a computer. It's not plugged into anything. And it'll record something like 40 hours of voice. And later on, I can hook it up to my computer as a standard mass storage device and just download the waveform I believe. So it does have some Windows firmware or Mac firmware. I didn't have too much fun getting that to work under Linux. I tried under a couple of different VM products and wasn't having any luck. So try it under wine. I tried under open box. Eventually I did end up installing like a full Windows 10 install onto a qemu image. And that had enough stuff working such that I could install the Rode firmware on it. That let me do an upgrade of the firmware on the two microphones and the transceiver because the first thing you do when you buy something these days is out of the box you have to upgrade the firmware because why would they do that at the factory before they send it out when they can just make the users do that. And there is a phone app but it does not let you update the firmware on these particular hardware models. If I remember the error message correctly it does look like the Android app lets you update the firmware on other Rode microphone devices but not this particular model. So I had to go down the track of setting up a qemu. I did find a good blog post on how to set up a Windows box on qemu. It had a few things that seem outdated so maybe it's a job for future me to write an updated blog post on how to do this. If for nothing else instructions on how to do this in future when I need to rerun the firmware update. The other thing that I really needed to use the software for though is to switch on the recording option. So out of the box these things do not record to the memory that's built into the microphones. So I had to get, I had to update the firmware and then I had to run the software on both of the microphones to switch on the recording option. But now that that switched on I can just hook it up as a USB master device as I've mentioned before and presumably I can just copy the files and delete the files and I won't actually have to run that software. So yeah there's a number of options going forward so I can write that blog post with the updated details. There were a number of hoops that I found that I did not have to go through of the blog post I found so things are getting easier over time. Depending on how in depth I want to go I could potentially one day sit down and install like a USB listening device and see if I can work out how to work out if there are any magic packets getting sent to do the configuration on the device. Do I need to break any crypto stuff or is it just a straight command like plug in the device and send a command with a few funky options. So maybe in the very distant future when I've got no other things on I could try and work out a pure USB non windows solution for setting some of these configuration options. I'm not sure I'd go down the track of updating the family I think that's probably a little bit too risky but you know maybe one day in the future. But yeah basically this set of microphones assuming that it works out okay assuming that it sounds good. I'll hopefully be using these for conferences coming up. Hopefully as well I'll be able to use it for camping and stuff like that so if I'm out and about I'll just be able to pull out these two things transceiver, microphone, a couple of clicks turn them on they talk to each other wirelessly and then start recording something. So it's much smaller than the current microphone that I'm using so it's much easier to travel with. There are two of them so that when I'm interviewing someone it's much easier and it's got recording memory so I don't actually have to plug them into a computer so all up it should be much easier to use. I think it might even give better recording outputs and hopefully like increase the number of talks and presentations that I give on HBO. So that's been Clinton this has been a very off the cuff recording I very much am used to sitting down and writing out a full script for these things so I'm doing this because it's cool new hardware but also because HPR needs more episodes. So yeah maybe other people can do an episode on what particular funky wireless or what particular microphones that they've got that they enjoy using and what the advantages are and disadvantages are. That's it for now. Ciao.

Show Transcript

Automatically generated using whisper

whisper --model tiny --language en hpr4121.wav

You can save these subtitle files to the same location as the HPR Episode, and they will automatically show in players like mpv, vlc. Some players allow you to specify the subtitle file location.


hpr4120 :: South Carolina to Home

We leave Charleston, South Carolina, and head back home.

Thumbnail of Ahuka
Hosted by Ahuka on 2024-05-17 is flagged as Clean and released under a CC-BY-SA license.
RV, travel, southeast US, Charleston, South Carolina. Travel. (Be the first).

Listen in ogg, spx, or mp3 format. Play now:

Duration: 00:12:21

We finish our South Carolina visit touring a plantation, and then go to see a magnificent live oak tree. After that, it is time for us to head back home.

Show Transcript

Automatically generated using whisper

whisper --model tiny --language en hpr4120.wav

You can save these subtitle files to the same location as the HPR Episode, and they will automatically show in players like mpv, vlc. Some players allow you to specify the subtitle file location.


hpr4119 :: Cov's Jams 003

A compilation of libre licensed music that Cov enjoyed listening to

Hosted by Cov on 2024-05-16 is flagged as Clean and released under a CC-BY-SA license.
music. All Songs Considered. (Be the first).

Listen in ogg, spx, or mp3 format. Play now:

Duration: 00:11:38

Welcome to the third episode of Cov's jams.

We'll start with a couple electronica pieces from Arkadii Kaplan: Corporate Success and Chasing the Shadow. I also featured Kaplan in the second episode of Cov's Jams, way back in 2016. I'm glad to be back.

Next up are two dubstep selections: Time to Army by Muciojad and Sweet Nothing by K4MMERER.

Daniel Bautista's Symphony Number 5 will close out the episode. Daniel Bautista wins at Free, Libre, and Open Source. Not only is he playing public domain Beethoven, but he recorded and mixed the album (in May and June of 2008) on a Gentoo Linux box. Gentoo is how I really learned Linux. He's still releasing libre licensed albums and his newer releases have video recordings which he edits in kdenlive.

The first four tracks are under the Creative Commons Attribution-Share Alike license: Corporate Success and Chasing the Shadow by Arkadii Kaplan, Time to Army by Muciojad, and Sweet Nothing by K4MMERER. Daniel Bautista's Symphony Number 5 is licensed Creative Commons Attribution.

Thank you for listening to this third episode of Cov's Jams. I hope we can enjoy some new tunes together soon!

Show Transcript

Automatically generated using whisper

whisper --model tiny --language en hpr4119.wav

You can save these subtitle files to the same location as the HPR Episode, and they will automatically show in players like mpv, vlc. Some players allow you to specify the subtitle file location.


hpr4118 :: Toil versus Livelihood

A contribution to the discussions about AI as a threat to our livelihoods

Hosted by dnt on 2024-05-15 is flagged as Clean and released under a CC-BY-SA license.
work, generative AI. general. 4.

Listen in ogg, spx, or mp3 format. Play now:

Duration: 00:24:11

This is sort of a response to hpr4097 :: Will they take our jobs? Of course they will. by dodddummy, and also the latest community news show, and other shows about the topic.

References:

Show Transcript

Automatically generated using whisper

whisper --model tiny --language en hpr4118.wav

You can save these subtitle files to the same location as the HPR Episode, and they will automatically show in players like mpv, vlc. Some players allow you to specify the subtitle file location.


hpr4117 :: JAMBOREE !

Java Android Magisk Burp Objection Root Emulator Easy (JAMBOREE)

Hosted by operat0r on 2024-05-14 is flagged as Explicit and released under a CC-BY-SA license.
android, powershell, windows, pentesting, AI, llm. general. (Be the first).

Listen in ogg, spx, or mp3 format. Play now:

Duration: 00:18:46

https://github.com/freeload101/Java-Android-Magisk-Burp-Objection-Root-Emulator-Easy

Java Android Magisk Burp Objection Root Emulator Easy (JAMBOREE)
Get a working portable Python/Git/Java environment on Windows in SECONDS without having local administrator, regardless of your broken Python or other environment variables. Our open-source script downloads directly from proper sources without any binaries. While the code may not be perfect, it includes many useful PowerShell tricks.

Run Android apps and pentest without the adware and malware of BlueStacks or NOX.

Features / Request
Core        Status
RMS:Runtime Mobile Security ✔️
Brida, Burp to Frida bridge ❌
SaftyNet+ Bypass    ❌
Burp Suite Pro / CloudFlare UserAgent Workaround-ish    ✔️
ZAP Using Burp  ✔️
Google Play ✔️
Java    ✔️
Android 11 API 30   ✔️
Magisk  ✔️
Burp    ✔️
Objection   ✔️
Root    ✔️
Python  ✔️
Frida   ✔️
Certs   ✔️
AUTOMATIC1111   ✔️
AutoGPT ✔️
Bloodhound  ✔️
PyCharm ✔️
OracleLinux WSL ✔️
Ubuntu/Olamma WSL   ✔️
Postgres No admin   ✔️
SillyTavern ✔️
Volatility 3    ✔️
Arduino IDE / Duck2Spark    ✔️
Youtube Downloader Yt-dlp   ✔️

How it works:
Temporarily resets your windows $PATH environment variable to fix any issues with existing python/java installation
Build a working Python environment in seconds using a tiny 16 meg nuget.org Python binary and portable PortableGit. Our solution doesn't require a package manager like Anaconda. I would like to make it even easier to use but I don't want to spend more time developing it if nobody is going to use it! Please let me know if you like it and open bugs/suggestions/feature request etc! You can contact me at https://rmccurdy.com !

Installation/Requirements ( For Android AVD Emulator) :
Local admin just to install Android AVD Driver:
HAXM Intel driver ( https://github.com/intel/haxm )

OR

AMD ( https://github.com/google/android-emulator-hypervisor-driver-for-amd-processors )

Usage:
Put ps1 file in a folder
Rightclick Run with PowerShell

OR

From command prompt

powershell -ExecutionPolicy Bypass -Command "[scriptblock]::Create((Invoke-WebRequest "https://raw.githubusercontent.com/freeload101/Java-Android-Magisk-Burp-Objection-Root-Emulator-Easy/main/JAMBOREE.ps1").Content).Invoke();" More infomation on bypass Root Detection and SafeNet https://www.droidwin.com/how-to-hide-root-from-apps-via-magisk-denylist/

( Watch the Video Tutorial below it's a 3-5 min process. You only have to setup once. After that it's start burp then start AVD )

Burp/Android Emulator (Video Tutorial )
Update Video with 7minsec Podcast!

https://youtu.be/XdXleap0BiM

name

(Video Tutorial)

https://youtu.be/pYv4UwP3BaU

name

USB Rubber Ducky Scripts & Payloads Python 3 Arduino DigiSpark

https://youtu.be/e8tKhFS0Tow

name

Old payloads: https://github.com/hak5/usbrubberducky-payloads/tree/1d3e9be7ba3f80cdb008885fac49be2ba926649d/payloads

PhreakNIC 24: Java Android Magisk Burp Objection Root Emulator Easy (JAMBOREE)

https://www.youtube.com/watch?v=R1eu2Ui1ZLU

name

Show Transcript

Automatically generated using whisper

whisper --model tiny --language en hpr4117.wav

You can save these subtitle files to the same location as the HPR Episode, and they will automatically show in players like mpv, vlc. Some players allow you to specify the subtitle file location.


hpr4116 :: Response to 4109: Building community without SEO

Building community does not require marketing and too much marketing can sometimes destroy community

Hosted by hobs on 2024-05-13 is flagged as Explicit and released under a CC-BY-SA license.
hpr, community, marketing, enshittification, social media, fediverse, small web. general. 5.

Listen in ogg, spx, or mp3 format. Play now:

Duration: 00:19:18

I was inspired by Knightwise's episode 4109 on future-proofing HPR.
I agree with many of your criticisms, but I'm not sure that a marketing strategy is the best way forward. Many of the most successful and sustainable businesses and organizations have been built on word-of-mouth.
For example I heard of Google, Zoom, Gmail, Facebook, Slack, Twitter, Discord, etc from my IRL friends and coworkers rather than from a marketing message. And most of the open source communities I'm a part of (Linux, Python, Firefox, Hugging Face, etc) are successful precisely because their success is not subject to a BigTech algorithm or exploitative terms-and-conditions.
Most open source projects are able to build community much by actively resisting the temptation to create a marketing message or social media campaign and instead focusing on the authenticity and quality of their "product" and catering to their contributors' and users niche needs and sensibilities.

Points of agreement (Rapoport Rule #2)

  • I share Knightwise's love and concern for the HPR community
  • I agree the intro theme song and voiceover could be accelerated and improved
  • I whole-heartedly agree the comments interface could be made easier to use
  • I agree that the HPR community feels like a monastery or convent. Perhaps faith in FOSS is a kind of religious belief or value that supersedes normal human instincts and drives.
  • I 100% support hackers that evangelize for HPR on their favorite bigtech social media platforms.

My FOSS podcatcher Antennapod, automatically skips the intro. I had to rewind in order to hear the episode number and host username in order to compose my reply.
And I have trouble engaging with the comments interface on the HPR site.
I wasn't even aware of comments on my previous episodes and once I did learn of it I found it easier to reply on Mastodon rather than on the HPR website.
As a community, I think we take it on faith that there is a place in the world for people like us that just want to share ideas, unmediated by shadow-banning, rug-pulling corporations and attention-hacking algorithms. I want to have a conversation with thoughtful people. I don't want to be engaged or monetized or exploited

  • A young person that is turned off after 3 seconds of retro-sounding audio is likely to not enjoy the "sound of woodwork (2442)" or "overlanding" audio journals (4037) of semi-retired geeks.
  • Many of us know that what we do in life cannot be measured in dollars or like button clicks, but rather by the quality of our friendships and the collective ideas that we share.
  • Zombies on Facebook, Twitter, Discord and Slack must eventually "see the light" for themselves and come flocking to "the small web" as they did during Xitter's decline.
  • HPR has been a significant positive force in my life and I would hate to sully its openness and authenticity with SEO or other marketing strategies (I know this is not what you proposed)
  • I think the enshittified Discord network is the wrong business to entrust with our community, for one thing, its app doesn't work on Linux
  • Marketing and SEO are effective tools for growth-seeking businesses, but ill-suited for an open source community
  • Anyone interested in business strategy would enjoy the eye-opening book The Internet Con by Cory Doctorow at the EFF.
  • Open source communities such as Reddit, Reddis, Terraform, Mongo, Substack, Medium, and MySQL were destroyed by growth-hackers pulling the rug out from under open source contributors and authors who eventually rebelled to fork or reverse-engineer these products and "win the day."
  • We geeks at HPR are not alone in our disaffection with business-mediated social interactions. Look at the mass eexodus from twitter. And the exit from substack. And from open source communities like reddit, reddis, terraform, mongo, and mysql. If you want to contribute your labor to a newly enshittified product they are actively seeking new contributors (and marketers) as their founding engineers abandon ship and create their own forks.
  • People share personal private contact information here that could endanger their emotional and financial well-being and information security if it were exposed to a scammer/malware platform like Discord. Discord sells your phone number to con-artists and scammers. And Xitter users talk about the blue checkmark validating their social value, but it's really a mark of shame. Discord hawks a similarly worthless token of social cred, and paywalls something as fundamental to communication as emojies. No thanks. They can take their dancing robot and bursting-heart emojies and shove 'em where the sun don't shine.

Enhance the comments interface?

  • Would a bridge server that pulled from our RSS feed and posted to an HPRbot channel on Mastodon help?
  • I've not tried BlueSky yet
  • We could even auto-post to Xitter and Facebook in the same way that Threads evangelizes Facebook to the Fediverse
  • It might be possible to directly connect the comments feed on HPR to Mastodon or BlueSky automatically.

References

Show Transcript

Automatically generated using whisper

whisper --model tiny --language en hpr4116.wav

You can save these subtitle files to the same location as the HPR Episode, and they will automatically show in players like mpv, vlc. Some players allow you to specify the subtitle file location.


hpr4115 :: Tagging music with Beets

Some things to know before you use beets to tag your music

Hosted by dnt on 2024-05-10 is flagged as Clean and released under a CC-BY-SA license.
beets, opus, music, funkwhale. general. 1.

Listen in ogg, spx, or mp3 format. Play now:

Duration: 00:19:01

References

Show Transcript

Automatically generated using whisper

whisper --model tiny --language en hpr4115.wav

You can save these subtitle files to the same location as the HPR Episode, and they will automatically show in players like mpv, vlc. Some players allow you to specify the subtitle file location.


hpr4114 :: Introduction to jq - part 2

Options to jq; learning about filters

Thumbnail of Dave Morriss
Hosted by Dave Morriss on 2024-05-09 is flagged as Explicit and released under a CC-BY-SA license.
JSON, JavaScript Object Notation, jq, jq filter, jq language. general. (Be the first).

Listen in ogg, spx, or mp3 format. Play now:

Duration: 00:24:44

Overview

In the last episode we looked at how JSON data is structured and saw how jq could be used to format and print this type of data.

In this episode we'll visit a few of the options to the jq command and then start on the filters written in the jq language.

Options used by jq

In general the jq command is invoked thus:

jq [options...] filter [files...]

It can be given data in files or sent to it via the STDIN (standard in) channel. We saw data being sent this way in the last episode, having been downloaded by curl.

There are many options to the command, and these are listed in the manual page and in the online manual. We will look at a few of them here:

--help or -h

Output the jq help and exit with zero.

-f filename or --from-file filename

Read filter from the file rather than from a command line, like awk´s -f option. You can also use ´#´ to make comments in the file.

--compact-output or -c

By default, jq pretty-prints JSON output. Using this option will result in more compact output by instead putting each JSON object on a single line.

--color-output or -C and --monochrome-output or -M

By default, jq outputs colored JSON if writing to a terminal. You can force it to produce color even if writing to a pipe or a file using -C, and disable color with -M.

--tab

Use a tab for each indentation level instead of two spaces.

--indent n

Use the given number of spaces (no more than 7) for indentation.

Notes

  • The -C option is useful when printing output to the less command with the colours that jq normally generates. Use this:

    jq -C '.' file.json | less -R

    The -R option to less allows colour escape sequences to pass through.

  • Do not do what I did recently. Accidentally leaving the -C option on the command caused formatted.json to contain all the escape codes used to colour the output:

    $ jq -C '.' file.json > formatted.json

    This is why jq normally only generates coloured output when writing to the terminal.

Filters in jq

As we saw in the last episode JSON can contain arrays and objects. Arrays are enclosed in square brackets and their elements can be any of the data types we saw last time. So, arrays of arrays, arrays of objects, and arrays of both of these are all possible.

Objects contain collections of keyed items where the keys are strings of various types and the values they are associated with can be any of the data types.

JSON Examples

Simple arrays:

[1,2,3]
[1,2,3,[4,5,6]]
["Hacker","Public","Radio"]
["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]

Simple object:

{ "name": "Hacker Public Radio", "type": "podcast"}

This more complex object was generated by the Random User Generator API. It is a subset of what can be obtained from this site.

{
  "gender": "female",
  "name": {
    "title": "Mrs",
    "first": "Jenny",
    "last": "Silva"
  },
  "dob": {
    "date": "1950-01-03T21:38:19.583Z",
    "age": 74
  },
  "nat": "GB"
}

This one comes from the file countries.json from the Github project mledoze/countries. It is a subset of the entry for Mexico.

{
  "name": {
    "common": "Mexico",
    "official": "United Mexican States",
    "native": {
      "spa": {
        "official": "Estados Unidos Mexicanos",
        "common": "México"
      }
    }
  },
  "capital": [
    "Mexico City"
  ],
  "borders": [
    "BLZ",
    "GTM",
    "USA"
  ]
}

Identity filter

This is the simplest filter which we already encountered in episode 1: '.'. It takes its input and produces the same value as output. Since the default action is to pretty-print the output it formats the data:

$ echo '["Hacker","Public","Radio"]' | jq .
[
  "Hacker",
  "Public",
  "Radio"
]

Notice that the filter is not enclosed in quotes in this example. This is usually fine for the simplest filters which don't contain any characters which are of significance to the shell. It's probably a good idea to always use (single) quotes however.

There may be considerations regarding how jq handles numbers. Consult the jq documentation for details.

Object Identifier-Index filter

This form of filter refers to object keys. A particular key is usually referenced with a full-stop followed by the name of the key.

In the HPR statistics data there is a top-level key "hosts" which refers to the number of currently registered hosts. This can be obtained thus (assuming the JSON is in the file stats.json):

$ jq '.hosts' stats.json
357

The statistics file contains a key 'stats_generated' which marks a Unix time value (seconds since the Unix Epoch 1970-01-01). This can be decoded on the command line like this:

$ date -d "@$(jq '.stats_generated' stats.json)" +'%F %T'
2024-04-18 15:30:07

Here the '-d' option to date provides the date to print, and if it begins with a '@' character it's interpreted as seconds since the Epoch. Note that the result is in my local time zone which is currently UTC + 0100 (aka BST).

Using object keys in this way only works if the keys contain only ASCII characters and underscores and don't start with a digit. To use other characters it's necessary to enclose the key in double quotes or square brackets and double quotes. So, assuming the key we used earlier had been altered to 'stats-generated' we could use either of these expressions:

."stats-generated"
.["stats-generated"]

Of course, the .[<string>] form is valid in all contexts. Here <string> represents a JSON string in double quotes. The jq documentation refers to this as an Object Index.

What if you want the next_free value discussed in the last episode (number of shows until the next free slot)? Just typing the following will not work:

$ jq '.next_free' stats.json
null

This is showing that there is no key next_free at the top level of the object, the key we want is in the object with the key slot.

If you request the slot key this will happen:

$ jq '.slot' stats.json
{
  "next_free": 8,
  "no_media": 0
}

Here an object has been returned, but we actually want the value within it, as we know.

This is where we can chain filters like this:

$ jq '.slot | .next_free' stats.json
8

The pipe symbol causes the result of the first filter to be passed to the second filter. Note that the pipe here is not the same as the Unix pipe, although it looks the same

There is a shorthand way of doing this "chaining":

$ jq '.slot.next_free' stats.json
8

This is a bit like a file system path, and makes the extraction of desired data easier to visualise and therefore quite straightforward, I think.

Array index filter

We have seen the object index filter .[<string>] where <string> represents a key in the object we are working with.

It makes sense for array indexing to be .[<number>] where <number> represents an integer starting at zero, or a negative integer. The meaning of the negative number is to count backwards from the last element of the array (which is -1).

So, some examples might be:

$ echo '["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]' | jq '.[1]'
"Monday"

$ echo '["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]' | jq '.[-1]'
"Sat"

$ echo '[1, 2, 3, [4, 5, 6]]' | jq '.[-1]'
[
  4,
  5,
  6
]

We will look at more of the basic filters in the next episode.

Show Transcript

Automatically generated using whisper

whisper --model tiny --language en hpr4114.wav

You can save these subtitle files to the same location as the HPR Episode, and they will automatically show in players like mpv, vlc. Some players allow you to specify the subtitle file location.


hpr4113 :: Today I Learnt, sed hold/pattern space use.

Sgoti talks about using sed hold/pattern spaces.

Thumbnail of Some Guy On The Internet
Hosted by Some Guy On The Internet on 2024-05-08 is flagged as Clean and released under a CC-BY-SA license.
TIL, sed. general. (Be the first).

Listen in ogg, spx, or mp3 format. Play now:

Duration: 00:34:43

Today I Learnt, sed hold/pattern space use.

Sgoti talks about using sed hold/pattern spaces.

  • Tags: TIL, sed

I fixed the ${ls} /usr/bin to ${ls} ${bindir} issue mentioned in the show.

#!/bin/bash
# License: GPL v3
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.

#Name: grab-bin.sh
#Purpose: Link your binaries.
#Version: beta 0.07
#Author: SGOTI (Some Guy On The Internet)
#Date: 2023-12-17

#variables:

bindir=/usr/bin/

awk=${bindir}awk
cat=${bindir}cat
chmod=${bindir}chmod
date=${bindir}date
echo=${bindir}echo
find=${bindir}find
ls=${bindir}ls
mktemp=${bindir}mktemp
sed=${bindir}sed
uniq=${bindir}uniq

#start:

    ${echo} -e "\nStep 0: $(${date} +%F), $(${date} +%T)";

# Create the /tmp/ directory to place the files.
function mkt (){
if [ -d /tmp/$(${date} +%F).* ]; then
    tmpdir1=$(ls -d /tmp/$(${date} +%F).*)
        ${echo} -e "The directory already exists.\n${tmpdir1}"
else
    tmpdir0=$(${mktemp} -d /tmp/$(${date} +%F).XXXXXXXX)
    tmpdir1=${tmpdir0}
    ${find} "${tmpdir1}" -type d -exec ${chmod} -R =700 {} +;
        ${echo} "Had to create ${tmpdir1}"
fi
}

mkt
    ${echo} -e "\nStep 1: $(${date} +%F), $(${date} +%T)";

# Files created by this script.
tmpdoc0=${tmpdir1}/$(${date} +%Y%m%d)variables.txt
tmpdoc1=${tmpdir1}/$(${date} +%Y%m%d)bash.vim
tmpdoc2=${tmpdir1}/$(${date} +%Y%m%d)sed-script.sed

# Here-document to build the first document (variables.txt).
${cat} > ${tmpdoc0} << "EOL0"
bindir=/usr/bin/

EOL0

# variables.txt body.
${ls} -1 ${bindir}
| ${sed} -n '
h
s/[^0-9a-zA-Z]//g
G
s/\n/ /
s/(.*) (.*)/1=${bindir}2/p
' >> ${tmpdoc0}
${sed} -i '/[/d' ${tmpdoc0}

    ${echo} -e "\nStep 2: $(${date} +%F), $(${date} +%T)";

# Bash.vim here-document.
${cat} > ${tmpdoc1} << "EOL1"
iabbr case;
case ${var_name} in
<CR>    [yY])
<CR>    ${echo} 'User said, "Yes"';
<CR>    ;;
<CR>
<CR>    [nN])
<CR>    ${echo} 'User said, "No"';
<CR>    ;;
<CR>
<CR>    [qQ])
<CR>    ${echo} "Let's get outta here.";
<CR>    exit
<CR>    ;;
<CR>
<CR>    *)
<CR>    ${echo} "Good Heavens! Someone broke the script I'm writing.";
<CR>    exit
<CR>    ;;
<CR>esac

iabbr here; ${cat} << _EOD_<CR>_EOD_<CR><ESC>2k0

iabbr func function NAME () {<CR><CR>}<UP>
iabbr if; if []; then<CR><ESC>Ielse<CR>${echo} "Good Heavens!"<CR><ESC>Ifi<ESC>4k0A
iabbr ali; alias NAME=''<ESC>B

iabbr ; ()<Left><Left>

EOL1

# bash.vim body.
${ls} -1 ${bindir}
| ${sed} -n ' {
h
s/[^0-9a-zA-Z]//g
G
s/\n/ /
s/(.*) (.*)/iabbr 1 ${2}/p
}
' >> ${tmpdoc1}

# Bash.vim here-document second pass.
${cat} >> ${tmpdoc1} << EOL1-5

iabbr vars;
bindir=/usr/bin/
<CR>
EOL1-5

# bash.vim body second pass.
${ls} -1 ${bindir}
| ${sed} -n ' {
h
s/[^0-9a-zA-Z]//g
G
s/\n/ /
s/(.*) (.*)/\<CR>1=${bindir}2/p
}
' >> ${tmpdoc1}

${sed} -i '/{[}/d; /${bindir}[/d' ${tmpdoc1}

    ${echo} -e "\nStep 3: $(${date} +%F), $(${date} +%T)";

# Sed script here-document.
${cat} > ${tmpdoc2} << "EOL2"
#!/usr/bin/sed -f

EOL2

# Sed script body.
${ls} -1 ${bindir}
| ${sed} -n '
h
s/[^0-9a-zA-Z]//g
G
s/\n/ /
s/(.*) (.*)/s/\<2\>/${1}/g/p
' >> ${tmpdoc2}
${sed} -i '/[/d' ${tmpdoc2}

${find} "${tmpdir1}" -type d -exec chmod -R =700 {} +;
${find} "${tmpdir1}" -type f -exec chmod -R =600 {} +;

    ${echo} -e "\nStep 4: $(${date} +%F), $(${date} +%T)";

exit;

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Show Transcript

Automatically generated using whisper

whisper --model tiny --language en hpr4113.wav

You can save these subtitle files to the same location as the HPR Episode, and they will automatically show in players like mpv, vlc. Some players allow you to specify the subtitle file location.


hpr4112 :: JSON and VENDORS and AUTH ohh my!

I talk and rant about JSON and Vendors

Hosted by operat0r on 2024-05-07 is flagged as Explicit and released under a CC-BY-SA license.
programming, python. general. (Be the first).

Listen in ogg, spx, or mp3 format. Play now:

Duration: 00:20:30

Some stuff I use to help make APIs

https://github.com/freeload101/Python/blob/master/Python_Includes_RMcCurdy.py

JAMBOREE.rmccurdy.com for burp suite. Have I done a podcast on JAMBOREE? I must have... If not I will

Show Transcript

Automatically generated using whisper

whisper --model tiny --language en hpr4112.wav

You can save these subtitle files to the same location as the HPR Episode, and they will automatically show in players like mpv, vlc. Some players allow you to specify the subtitle file location.


Previous five weeks

hpr4111 :: HPR Community News for April 2024 hosted by HPR Volunteers

2024-05-06. 01:10:26. Explicit. HPR Community News.
Community News.

HPR Volunteers talk about shows released and comments posted in April 2024

Listen in ogg, spx, or mp3 format.

hpr4110 :: Playing Civilization III, Part 2 hosted by Ahuka

2024-05-03. 00:15:14. Clean. Computer Strategy Games.
Computer games, strategy games, Civilization III.

We continue to look at the details of playing this game.

Listen in ogg, spx, or mp3 format.

hpr4109 :: The future of HPR hosted by knightwise

2024-05-02. 00:24:56. Clean. general.
marketing, hpr, future, vision.

Knightwise talks about the some of the changes HPR could embrace to become future proof.

Listen in ogg, spx, or mp3 format.

hpr4108 :: What's in my bag hosted by swift110

2024-05-01. 00:10:00. Clean. general.
bag, linux, laptop, ipad, electronics.

I describe what's in my bag

Listen in ogg, spx, or mp3 format.

hpr4107 :: Response to HPR #4065 hosted by swift110

2024-04-30. 00:21:33. Clean. general.
linux, framework, laptop, computers.

Shoutout to a shoutout I talk more about what I want in a Framework laptop

Listen in ogg, spx, or mp3 format.

hpr4106 :: My tribute to feeds hosted by Henrik Hemrin

2024-04-29. 00:04:27. Clean. general.
feeds, rss, atom.

Feeds are useful to keep me updated with new information from websites I am interested in.

Listen in ogg, spx, or mp3 format.

hpr4105 :: My story how I found a cure for my obesity hosted by Jeroen Baten

2024-04-26. 00:39:00. Clean. general.
fasting, weight loss, weight gain, insulin, Jason Fung, fasting.

A talk about my historical weight gain and what I recently learned so that I now lose weight.

Listen in ogg, spx, or mp3 format.

hpr4104 :: Introduction to jq - part 1 hosted by Dave Morriss

2024-04-25. 00:18:35. Explicit. general.
JSON, JavaScript Object Notation, command line, functional programming language, jq.

The JSON data format, and using the jq utility to process it

Listen in ogg, spx, or mp3 format.

hpr4103 :: What's in my bag? hosted by Dave Hingley

2024-04-24. 00:05:17. Clean. What's in My Toolkit.
Bag, drawing, comics, toolkit.

An examination of the bag I use when out on the road

Listen in ogg, spx, or mp3 format.

hpr4102 :: Re:HPR 3133 More MPV Quick Tips hosted by Archer72

2024-04-23. 00:05:25. Clean. general.
Media, Video.

Archer72 chats about capture of extensive MPV history

Listen in ogg, spx, or mp3 format.

hpr4101 :: A I O M G hosted by operat0r

2024-04-22. 00:28:09. Explicit. general.
AI, ai art, ai text generation, resume, jobs.

Some other guy on the internet talks about A I

Listen in ogg, spx, or mp3 format.

hpr4100 :: Charleston, South Carolina hosted by Ahuka

2024-04-19. 00:11:25. Clean. Travel.
RV, travel, southeast US, Charleston, South Carolina.

We visit Charleston, South Carolina, and meet up with some friends

Listen in ogg, spx, or mp3 format.

hpr4099 :: Introducing Home Automation and Home Assistant hosted by Ken Fallon

2024-04-18. 00:15:15. Clean. Home Automation.
Home Automation, Internet of Things, IOT, Home Assistant, HA.

A new series about all things Home Automation, this time a introduction to Home Assistant

Listen in ogg, spx, or mp3 format.

hpr4098 :: Road trips without GPS hosted by Trey

2024-04-17. 00:07:14. Clean. general.
maps, travel, navigation, rant.

A short, off the cuff, discussion of how we navigated road trips in the past

Listen in ogg, spx, or mp3 format.

hpr4097 :: Will they take our jobs? Of course they will. hosted by dodddummy

2024-04-16. 00:34:02. Explicit. general.
AI, Robots.

I blather on about my thoughts on robots taking our jobs.

Listen in ogg, spx, or mp3 format.

hpr4096 :: Powers of two hosted by Deltaray

2024-04-15. 00:17:04. Clean. general.
math, debugging, commodore, amiga, sysadmin, servers, software.

A story and discussion around how knowing powers of two can be useful

Listen in ogg, spx, or mp3 format.

hpr4095 :: Twenty seven years of Linux hosted by Deltaray

2024-04-12. 00:44:40. Clean. general.
linux, gui, applications, productivity, graphics, music, games, rants.

Deltaray rambles on for 45 minutes and over exaggerates about how awesome it is to use Linux

Listen in ogg, spx, or mp3 format.

hpr4094 :: One year of Linux hosted by Daniel Persson

2024-04-11. 00:17:23. Clean. general.
linux, windows.

My experience of running Linux full time for a year.

Listen in ogg, spx, or mp3 format.

hpr4093 :: Installing postmarketOS on a PINE64 PinePhone hosted by Claudio Miranda

2024-04-10. 00:07:32. Clean. general.
linux, mobile, pine64, pinephone, postmarketos, pmos.

Claudio discusses how to install postmarketOS on the PINE64 PinePhone

Listen in ogg, spx, or mp3 format.

hpr4092 :: More man-talk. hosted by Some Guy On The Internet

2024-04-09. 00:19:32. Explicit. Health and Healthcare.
mens health, bidets, fiber.

Sgoti talks about using bidets and other things. Good heavens!

Listen in ogg, spx, or mp3 format.

hpr4091 :: Test Driven Development Demo hosted by norrist

2024-04-08. 00:27:00. Clean. general.
python, testing, pytest.

norrist uses pytest to demonstrate TDD with a trival HPR info app

Listen in ogg, spx, or mp3 format.

hpr4090 :: Playing Civilization III, Part 1 hosted by Ahuka

2024-04-05. 00:15:04. Clean. Computer Strategy Games.
Computer games, strategy games, Civilization III.

We begin to look at the details of playing this game

Listen in ogg, spx, or mp3 format.

hpr4089 :: Modifying a Python script with some help from ChatGPT hosted by MrX

2024-04-04. 00:23:13. Explicit. A Little Bit of Python.
Programming, Python, AI.

In this episode I describe my experience of fixing some Python code with some help from ChatGPT.

Listen in ogg, spx, or mp3 format.

hpr4088 :: Today I Learnt more Bash tips hosted by Some Guy On The Internet

2024-04-03. 00:23:39. Clean. Bash Scripting.
Bash tips, TIL, getopts.

Sgoti talks about supplying options to bash scripts

Listen in ogg, spx, or mp3 format.

hpr4087 :: Getting started with the digiKam photo management software hosted by Henrik Hemrin

2024-04-02. 00:06:56. Clean. general.
photography, photo, digiKam, Digital Asset Management, DAM, software, opensource.

I will give you some suggestions to getting started with digiKam based on my experience.

Listen in ogg, spx, or mp3 format.

hpr4086 :: HPR Community News for March 2024 hosted by HPR Volunteers

2024-04-01. 01:00:02. Explicit. HPR Community News.
Community News.

HPR Volunteers talk about shows released and comments posted in March 2024

Listen in ogg, spx, or mp3 format.

hpr4085 :: Android User Land Google Assistant GPT hosted by operat0r

2024-03-29. 00:32:26. Explicit. general.
hacking, android.

operat0r tells you how to get past no ADB and blocking of 3rd party APKS

Listen in ogg, spx, or mp3 format.

hpr4084 :: Cloud learning hosted by Daniel Persson

2024-03-28. 00:10:14. Clean. general.
machine learning, cloud learning.

My experience trying to train a model online

Listen in ogg, spx, or mp3 format.

hpr4083 :: Drivecast: Man-talk. hosted by Some Guy On The Internet

2024-03-27. 00:08:38. Explicit. general.
Drivecast, man-talk, mens health.

Sgoti discusses men's issues, while driving.

Listen in ogg, spx, or mp3 format.

hpr4082 :: No swans at Swanston hosted by Dave Morriss

2024-03-26. 00:45:03. Explicit. general.
Edinburgh, Swanston Farm, meeting.

MrX and Dave Morriss bring you more chit-chat from Edinburgh

Listen in ogg, spx, or mp3 format.

Older Shows

Get a full list of all our shows.