diff --git a/sql/hpr.sql b/sql/hpr.sql index 9d0a6d7..4e8fa5e 100644 --- a/sql/hpr.sql +++ b/sql/hpr.sql @@ -12244,7 +12244,7 @@ CREATE TABLE `comments` ( `last_changed` datetime NOT NULL DEFAULT current_timestamp(), PRIMARY KEY (`id`), KEY `comments_eps_id_idx` (`eps_id`) -) ENGINE=MyISAM AUTO_INCREMENT=3785 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='New comments table populated from c5t_* tables'; +) ENGINE=MyISAM AUTO_INCREMENT=3786 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='New comments table populated from c5t_* tables'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -16029,6 +16029,7 @@ INSERT INTO `comments` (`id`, `eps_id`, `comment_timestamp`, `comment_author_nam (3776,3900,'2023-07-17 12:04:50','Kevin O\'Brien','Sansa Clip+','I used a Sansa Clip+ with Rockbox for a long time, but now the Sansa Clip+ is unavailable. The way I do it now, I can use any MP3 player.','2023-07-17 15:57:57'), (3777,3901,'2023-07-18 16:51:36','Reto','aCalendar on Android','Hi operat0r,\r\n\r\nI am in the same boat about forgetting appointments.\r\n\r\naCalendar is what I use for years and I like to say, it is the best calendar.\r\nI mention to you just one function: To copy an entry is as simple as it gets and so I you keep your history, instead of moving an entry. It also offers to create several entries, instead of a series. \r\nhttp://play.google.com/store/apps/details?id=org.withouthat.acalendar\r\n\r\nThe website for more information: http://acalendar.tapirapps.de\r\n\r\n\r\nNot synced with Google, I created a calendar that is as private as it gets. So I have to make backups. Backup your calendar with: iCal Import/Export CalDAV \r\nhttp://play.google.com/store/apps/details?id=tk.drlue.icalimportexport.premium\r\n\r\nThe Website: http://ical.drlue.at/\r\n\r\nTo support the developer I had to get the Pro Version, now it runs automated backups. Very useful app for me.\r\n\r\nMy two cents to your show.\r\n\r\nBr,\r\nReto','2023-07-18 17:01:42'), (3778,3909,'2023-07-29 20:13:11','dnt','Great show, keep em coming!','Thanks for this! Well done, and plenty for the listener to think about! Looking forward to more.','2023-07-29 21:20:16'), +(3785,3904,'2023-08-02 10:34:28','Beeza','Frienships','Hi Klaatu. Great show and very thought provoking. \r\n\r\nYou missed one type of friendship that applies to me and, I dare say, many others.\r\n\r\nI grew up and went to school in London and became one of a group of 7 \"mates\". We never used the term \"friends\" in case we were deemed \"soft\" - crazy I know. Over the years we have all moved away from each other, in one case to the other side of the world, so we often only meet one another once or twice a year, sometimes not even that, and don\'t even converse by phone or messaging much in between. Despite that we all know that we can totally rely on one another should the need arise, and when we do meet the intervening months or years simply have no relevance.\r\n\r\nApart from my immediate family, of course, these people are closer to me than anybody else but the need to be in constant contact just doesn\'t exist. It\'s the polar opposite of people who are constantly on Facebook communicating with \"friends\" they\'ve never met, and really know nothing about with any certainty.','2023-08-02 10:43:24'), (3780,3910,'2023-07-29 20:15:03','dnt','Game mechanics','This was interesting, I like your discussion of the game mechanics. This is why these games are so engrossing, when you get into them!','2023-07-29 21:20:16'), (3781,3904,'2023-07-29 20:16:37','dnt','Friends','Thanks for this! I listened to it on the way home from work and continued to think about it well into the evening.','2023-07-29 21:20:17'), (3782,3902,'2023-07-29 20:18:55','dnt','ffmpeg','I\'m looking forward to more of this. I haven\'t used ffmpeg much anymore, but it was essential to me in my videographer and video editor days. It\'s one of those applications that it\'s hard to imagine being without it, and amazing that we have it. Thanks!','2023-07-29 21:20:17'), @@ -19761,7 +19762,7 @@ INSERT INTO `eps` (`id`, `date`, `title`, `duration`, `summary`, `notes`, `hosti (3645,'2022-07-22','How to set up a small Linux Wireguard VPN',855,'I set up a small VPN and wrote a blog post about it. This is just an audiorecording of that','

The blogpost where I describe how to set up a Wireguard VPN network:
\nhttps://www.jeroenbaten.nl/the-complete-guide-to-setting-up-a-multi-peer-wireguard-vpn/

\n',369,61,0,'CC-BY-SA','wireguard,linux, vpn',0,0,1), (3648,'2022-07-27','A response to tomorrows show',1682,'Ken brings the DeLorean up to 141.6Kph to address monochromec\'s comment on stats','
\r\n

\r\nCounter Point\r\n

\r\n

\r\nThis show is a counter point to: hpr3649 :: Linux Inlaws S01E61: 20 years in review\r\n

\r\n
\r\n

There are three kinds of lies: Lies, damned lies, and statistics

\r\n

In today\'s show we discover that Hacker Public Radio is not a Podcast Hosting Platform.

\r\n

Each day your show will be heard by as many people as can squeeze into the main auditorium at FOSDEM, or between two and three Airbus A380-800. You know the big double decker passenger plane. Every month we have on average 33,584 downloads, that\'s about 40 fully loaded Airbus A380-800.

\r\n

\"\"

\r\n

Podcast \"Hosting\" Sites, like Spotify, Apple Podcast or Google Podcasts, etc. do not host the media, they are essentially monetizing Hacker Public Radio content. And we are all absolutely fine with that because our shows are released under a Creative Commons Attribution-ShareAlike 3.0 Unported license.

\r\n

\"actual_hpr_downloads\"

\r\n

Every one of those dots is a download that is not without cost, but is provided entirely free of charge to us by our kind hosting Provider AnHonestHost.com and the volunteer project the Internet Archive. Both of which donates terabytes of storage and data transfer to us for free.

\r\n

The people to thank are our own Josh Knapp over at AnHonestHost.com, who provides the Hacker Public Radio web site.

\r\n

And the Internet Archive which is an American digital library with the stated mission of \"universal access to all knowledge\", who provide hosting for the media.

\r\n

\r\nFor more details, see the full show notes.\r\n

\r\n',30,0,1,'CC-BY-SA','statistics,syndication,reality',0,0,1), (3637,'2022-07-12','HPR feed to Sqlite',454,'First step in creating a static copy of HPR','\n

One interesting thing I read during the discussion is Ken said Every thing needed to recreate an HPR site is in the feed

\n\n
git clone https://gitlab.com/norrist/hprfeed2db\ncd hprfeed2db/\npython3 -m venv venv\nsource venv/bin/activate\npip install feedparser peewee\npython data_models.py\npython feed.py\nsqlite3 hpr.sqlite "select count(*) from episode"
\n',342,0,0,'CC-BY-SA','python, rss, sqlite',0,0,1), -(3916,'2023-08-07','HPR Community News for July 2023',0,'HPR Volunteers talk about shows released and comments posted in July 2023','\n\n

New hosts

\n

\nWelcome to our new hosts:
\n\n HopperMCS, \n Reto.\n

\n\n

Last Month\'s Shows

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
IdDayDateTitleHost
3891Mon2023-07-03HPR Community News for June 2023HPR Volunteers
3892Tue2023-07-04Emacs package curation, part 1dnt
3893Wed2023-07-05Game card design resourcesKlaatu
3894Thu2023-07-06The Page 42 Show: Ugly News Week, Show\'s Epoch!HopperMCS
3895Fri2023-07-07What\'s in my backpackStache_AF
3896Mon2023-07-10The Brochs of GlenelgAndrew Conway
3897Tue2023-07-11HPR AudioBook Club 22 - Murder at Avedon HillHPR_AudioBookClub
3898Wed2023-07-12The Oh No! News.Some Guy On The Internet
3899Thu2023-07-13Repair corrupt video files for free with untrucPaul Quirk
3900Fri2023-07-14Preparing Podcasts for ListeningAhuka
3901Mon2023-07-17Time Managmentoperat0r
3902Tue2023-07-18Introduction to a new series on FFMPEGMr. Young
3903Wed2023-07-19Why I don\'t love systemd (yet)deepgeek
3904Thu2023-07-20How to make friendsKlaatu
3905Fri2023-07-21Presenting Fred Blackfolky
3906Mon2023-07-24The Oh No! News.Some Guy On The Internet
3907Tue2023-07-25My introduction showReto
3908Wed2023-07-26Emacs package curation, part 2dnt
3909Thu2023-07-27Permission tickets. one_of_spoons
3910Fri2023-07-28Playing Civilization IIAhuka
3911Mon2023-07-31An overview of the \'ack\' commandDave Morriss
\n\n

Comments this month

\n\n

Note to Volunteers: Comments marked in green were read in the last\nCommunity News show and should be ignored in this one.

These are comments which have been made during the past month, either to shows released during the month or to past shows.\nThere are 20 comments in total.

\n

Past shows

\n

There are 4 comments on\n3 previous shows:

\n

Updated on 2023-07-29 23:13:56

\n

This month\'s shows

\n

There are 16 comments on 11 of this month\'s shows:

\n\n\n

Mailing List discussions

\n

\nPolicy decisions surrounding HPR are taken by the community as a whole. This\ndiscussion takes place on the Mail List which is open to all HPR listeners and\ncontributors. The discussions are open and available on the HPR server under\nMailman.\n

\n

The threaded discussions this month can be found here:

\nhttps://hackerpublicradio.org/pipermail/hpr_hackerpublicradio.org/2023-July/thread.html\n\n\n

Events Calendar

\n

With the kind permission of LWN.net we are linking to\nThe LWN.net Community Calendar.

\n

Quoting the site:

\n
This is the LWN.net community event calendar, where we track\nevents of interest to people using and developing Linux and free software.\nClicking on individual events will take you to the appropriate web\npage.
\n\n

Any other business

\n

The HPR Static Site

\n

As mentioned in the last Community News episode, the HPR database and\nwebsite was moved to a new server, and the static site generator written\nby Rho`n was used to generated the non-interactive part of\nthe website.

\n

Since then, there has been a process of adapting the software to the\nnew configuration. Unfortunately Rho`n has not been\navailable during this process, but we are gradually learning our way\naround his excellent software and making changes to suit our needs.

\n

If you spot any problems or have ideas for new features, please raise\nissues on the Gitea repository at: https://repo.anhonesthost.net/rho_n/hpr_generator/issues.

\n\n\n',159,47,1,'CC-BY-SA','Community News',0,0,1), +(3916,'2023-08-07','HPR Community News for July 2023',0,'HPR Volunteers talk about shows released and comments posted in July 2023','\n\n

New hosts

\n

\nWelcome to our new hosts:
\n\n HopperMCS, \n Reto.\n

\n\n

Last Month\'s Shows

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
IdDayDateTitleHost
3891Mon2023-07-03HPR Community News for June 2023HPR Volunteers
3892Tue2023-07-04Emacs package curation, part 1dnt
3893Wed2023-07-05Game card design resourcesKlaatu
3894Thu2023-07-06The Page 42 Show: Ugly News Week, Show\'s Epoch!HopperMCS
3895Fri2023-07-07What\'s in my backpackStache_AF
3896Mon2023-07-10The Brochs of GlenelgAndrew Conway
3897Tue2023-07-11HPR AudioBook Club 22 - Murder at Avedon HillHPR_AudioBookClub
3898Wed2023-07-12The Oh No! News.Some Guy On The Internet
3899Thu2023-07-13Repair corrupt video files for free with untrucPaul Quirk
3900Fri2023-07-14Preparing Podcasts for ListeningAhuka
3901Mon2023-07-17Time Managmentoperat0r
3902Tue2023-07-18Introduction to a new series on FFMPEGMr. Young
3903Wed2023-07-19Why I don\'t love systemd (yet)deepgeek
3904Thu2023-07-20How to make friendsKlaatu
3905Fri2023-07-21Presenting Fred Blackfolky
3906Mon2023-07-24The Oh No! News.Some Guy On The Internet
3907Tue2023-07-25My introduction showReto
3908Wed2023-07-26Emacs package curation, part 2dnt
3909Thu2023-07-27Permission tickets. one_of_spoons
3910Fri2023-07-28Playing Civilization IIAhuka
3911Mon2023-07-31An overview of the \'ack\' commandDave Morriss
\n\n

Comments this month

\n\n

Note to Volunteers: Comments marked in green were read in the last\nCommunity News show and should be ignored in this one.

These are comments which have been made during the past month, either to shows released during the month or to past shows.\nThere are 20 comments in total.

\n

Past shows

\n

There are 4 comments on\n3 previous shows:

\n

Updated on 2023-08-02 17:19:18

\n

This month\'s shows

\n

There are 16 comments on 11 of this month\'s shows:

\n\n\n

Mailing List discussions

\n

\nPolicy decisions surrounding HPR are taken by the community as a whole. This\ndiscussion takes place on the Mail List which is open to all HPR listeners and\ncontributors. The discussions are open and available on the HPR server under\nMailman.\n

\n

The threaded discussions this month can be found here:

\nhttps://hackerpublicradio.org/pipermail/hpr_hackerpublicradio.org/2023-July/thread.html\n\n\n

Events Calendar

\n

With the kind permission of LWN.net we are linking to\nThe LWN.net Community Calendar.

\n

Quoting the site:

\n
This is the LWN.net community event calendar, where we track\nevents of interest to people using and developing Linux and free software.\nClicking on individual events will take you to the appropriate web\npage.
\n\n

Any other business

\n

The HPR Static Site

\n

As mentioned in the last Community News episode, the HPR database and\nwebsite was moved to a new server, and the static site generator written\nby Rho`n was used to generated the non-interactive part of\nthe website.

\n

Since then, there has been a process of adapting the software to the\nnew configuration. Unfortunately Rho`n has not been\navailable during this process, but we are gradually learning our way\naround his excellent software and making changes to suit our needs.

\n

If you spot any problems or have ideas for new features, please raise\nissues on the Gitea repository at: https://repo.anhonesthost.net/rho_n/hpr_generator/issues.

\n

Reserve Queue

\n

A policy change is required in the use of the reserve queue. When\nthere are unfilled slots between 5 and 7 days in the future, episodes in\nthis queue will be used to fill them.

\n

This extra time is required because of the time it can take to\nprocess a show and load it to the Internet Archive.

\n\n\n',159,47,1,'CC-BY-SA','Community News',0,0,1), (3643,'2022-07-20','My computing history and the software I use',3345,'Rambling about my computing history and tech stack. ','

I introduce myself by describing my computing history and tech stack. Disjointed rambling and tangentially related thoughts ensue.

\n',406,0,1,'CC-BY-SA','UNIX, Linux, first show, BSD, Android',0,0,1), (3658,'2022-08-10','Linux Inlaws S01E62: HPR\'s inner workings',1975,'An overview of HPRs inner workings and stats based on a ludicrous claim by the Inlaws','

In this episode our two ageing heroes explore the inner workings of a podcast (or podcast hosting platform depending on your perspective) called Hacker Public Radio. Yes, the platform that the Inlaws have been using since the very inception of this rapidly growing FLOSS podcast content. Wondering what the heck this episode is all about, why exactly Martin and Chris are talking about this now and the importance of statistics, lies and damned lies? Then just listen to this episode. You may also find out the difference between mere caching and content syndication. Never mind HPR\'s inner workings.

\n

Links:

\n\n',384,111,1,'CC-BY-SA','Lies, damned lies, stats, projections, CDNs, Ford, Ferrari, Monsters, Books',0,0,1), (3679,'2022-09-08','Linux Inlaws S01E64: Non-profits in the US: A closer look at 501(c)s',2177,'The Ins and Outs of 501(c)s','

In this episode, Martin and Chris shed more light on the riveting subject of non-profit\nand not-for-profit organisations especially in the US with a special focus on the all-\nimportant topic of tax implications. Warning: Due to the fast-paced and gripping never\nmind explicit nature of this topic, people with sleeping disabilities or who are easily startled\n/ offended by graphic content should consult a member of the medical profession to ensure\nthat they are capable of handling this episode. You have been warned.

\n

Links:

\n\n',384,111,1,'CC-BY-SA','501(c)3, 501(c)6, non-profits, not-for-profits, Church of Emacs, RMS, Serviettenknödel',0,0,1), @@ -19784,7 +19785,7 @@ INSERT INTO `eps` (`id`, `date`, `title`, `duration`, `summary`, `notes`, `hosti (3665,'2022-08-19','UNIX Is Sublime',3586,'I talk about all of the reasons I love UNIX','

UNIX is sublime

\n
Or, \"how to use a computer without hating yourself for it in the morning\"
\n
Or, \"Unix is basically a simple operating system . . .\"
\n
Or, \"My weariness and disdain for computers grow with each additional unit of knowledge\"
\n
Or, \"Worse is better\"
\n

Origins

\n

UNIX is not Multics

\n

Multics = Multiplexed Information and Computer Service

\n

UNIX = Uniplexed Information and Computing Service

\n

The name \'UNIX\' is a pun on the name \'Multics\'. Multics was entirely too large and complicated to be useful so the boys at Bell Labs cooked up something smaller, less complicated, and easier to use.

\n
\n

Ancient emulation interlude

\n

How to run Multics in 2022.

\n

This wiki helped me emulate UNIXv5.

\n

And this one helped me emulate UNIXv7.

\n

These guys host ancient systems accessible via guest accounts over ssh.

\n
\n

\"Cool, but useless.\"

\n
\n
\n

I know almost nothing about Multics and I\'m not sure if it\'s even worth learning. This is about UNIX, not Multics. Maybe I\'ll come back to it.

\n

Philosophy, implementations, ducks

\n

When I think of \"UNIX\", I do not think of the trademark. Instead, I think of the Unix philosophy. and the general design principles, interface, and behavior of a UNIX system.

\n

A better way of thinking about \"UNIX\" is as something \"POSIX-like\" rather than \"AT&T\'s commercial UNIX\". Example: although Linux and GNU are overly complicated, they pass the duck test for being a UNIX. Pedigree or not, you know a nix when you see one.

\n

Also, when I say \"UNIX\", I mean \"Free UNIX\". I have no interest in proprietary implementations that only exist for the purpose of restricting users and disempowering/discouraging sysadmins from becoming self-reliant.

\n

So what is the philosophy?

\n\n

And additionally:

\n\n

Design

\n

10,000 Ft View

\n

UNIX is a multiuser time sharing networked operating system, running as an always online service. A UNIX system is a single mainframe computer running an operating system designed for multiple users to access concurrently over the network, equally (depending on implementation) sharing resources amongst the active users.

\n

In a traditional network setup, there is one mainframe UNIX machine with multiple dumb terminals connected to it over the network. None of the users touch the mainframe physically. Instead, they interact with it exclusively through their own dumb terms. These dumb terminals have minimal or no computing power of their own because all of the actual computation takes place on the mainframe. Built in networking is a given.

\n

As for the actual software running on the mainframe, it\'s quite simple to visualize. A Unix system is a flexible but organized stack of concepts, each depending on the concept below, all working together for the sole purpose of enabling the end user to play video games and watch videos online.

\n
       / user applications \\\n      /       shells        \\\n     /        daemons        \\\n    /       file systems      \\\n   /        kmods/drivers      \\\n  /           syscalls          \\\n /             kernel            \\\n/             hardware            \\\n
\n

In order to fully explain why UNIX is sublime, I will start from the bottom and work my way upward. Before I discuss the shell, I will explain the multiuser aspects of the system. Then, after a long arduous journey of verbosity, explain how to actually use the thing.

\n

Kernel

\n

The kernel is something the user rarely interacts with. It abstracts all the hard parts away from the user. No more poking random memory addresses to load a program from tape.

\n

Multitasking

\n

In order to support multiple users, resource sharing was implemented. When a user\'s process requests CPU time, it\'s put into a rotational queue along with the other requests for CPU time. Round robin style concurrency is one of the easiest to implement but most modern systems use a weighted model that prioritizes processes owned by specific users. Memory and disk space are typically assigned hard limits to prevent system crashes. \"Ask your sysadmin if you need more resources.\"

\n

Virtual Memory

\n

Abstracting memory management from users is almost necessary in a multitasking system. The kernel must be the arbiter of all. The most interesting thing about virtual memory is that it doesn\'t actually need to be a RAM stick, but can be a swap partition on a disk or even a remote cloud provider if you\'ve actually lost your mind. This type of flexibility improves system stability. Instead of a kernel panic when memory runs out, the kernel can de-prioritize nonessential or idle processes by sending them to swap space.

\n

Paged Memory (logical memory)

\n

No more fragmented memories! The kernel maintains a page table that maps logical locations to physical locations. Instead one continuous chunk of memory, the kernel divides memory into small sections called \"pages\". When allocating memory, the kernel might not give a process continuous pages. The advantage of a paged memory scheme further enables multiuser computing. Example: When you have a large program like a web browser open, the pages that contains the unfocused tabs can be swapped out to disk without stalling the entire browser.

\n

Programming Interface pt. 0 (syscalls, kmods, drivers)

\n

When a process requests a resource, it sends a syscall to the kernel. The kernel then responds to the system call. This allows for privilege separation. Does your web browser need direct access to all memory? What about all files? Do we even want to write assembly every time we want to access a file? Syscalls are dual purpose: abstraction and security.

\n

Kernel modules are dynamic \"extensions\" that give the kernel new features (typically hardware support). The ability to dynamically load/unload modules as hardware changes increases uptime because it means a new kernel doesn\'t need to be compiled, installed, and booted into every time we plug in a different peripheral.

\n

Filesystem

\n

Hierarchical structure

\n

A UNIX filesystem is hierarchical. Each directory contains files or other directories, each with a specific purpose. This type of organization makes it very easy to navigate and manage a system. Each child directory inherits ownership and permissions unless otherwise specified (see Access Control).

\n

In order to visualize this, I imagine a tree-like structure descending from the root directory, /. The tree(1) program shows this type of hierarchy.

\n

Virtual Filesystems (logical filesystem)

\n

The idea behind virtual filesystems is, again, abstraction. Using the concept of a virtual file system, multiple disks can be presented to the user and programmer as a single unified filesystem. This means mounted local disks, NFS shares, and even the contents of a CDROM are presented as if the files contained therein are \"just on the big hard drive\".

\n

Additionally, using bind mounts, a directory can be mounted onto another directory as if it were just another filesystem.

\n

The final interesting thing about virtual filesystems is the concept of a ramdisk: mounting a section of memory so that it can be used as if it was an ordinary directory. <--Shoot foot here.

\n

Everything is a file

\n

Well, almost everything is presented as if it were a file. This greatly simplifies programming.

\n

Prime example: /dev/urandom is a random entropy generator presented as a file, making it very simple for a programmer to implement seeded RNG in a program.

\n

Another example: The kernel translates mouse input into a data stream that can be opened as a file. The programmer only needs to read from /dev/mouse0 instead of writing hundreds of mouse drivers for a clicky GUI.

\n

Exercise 1: Try running this command then wiggling your mouse:

\n
# Linux\n$ sudo cat /dev/input/mouse0\n\n# FreeBSD\n$ sudo cat /dev/sysmouse\n
\n

Yet another example: the TTY is just a file. You can even print it to a text file using setterm(1) on Linux.

\n

Exercise 2:

\n
[user@fedora ~]$ sudo setterm --dump 3\n[user@fedora ~]$ cat screen.dump\n\nFedora Linux 36 (Workstation Edition)\nKernel 5.18.5-200.fc36.x86_64 on an x86_64 (tty3)\n\nfedora login: root\nPassword:\nLast login: Sat Jul 30 14:34:20 on tty3\n[root@fedora ~]# /opt/pfetch/pfetch\n        ,'''''.   root@fedora\n       |   ,.  |  os     Fedora Linux 36 (Workstation Edition)\n       |  |  '_'  host   XXXXXXXXXX ThinkPad T490\n  ,....|  |..     kernel 5.18.5-200.fc36.x86_64\n.'  ,_;|   ..'    uptime 20d 22h 40m\n|  |   |  |       pkgs   3910\n|  ',_,'  |       memory 6522M / 15521M\n '.     ,'\n   '''''\n\n[root@fedora ~]#\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n[user@fedora ~]$\n
\n

Links

\n

Yet another way of \"mounting\" a file or directory to another file or directory is linking. There are two types of links: hard links and symbolic links.

\n

On UNIX, files are indexed by inodes (index nodes). Using links, we can make \"shortcuts\" to files.

\n

Hard linking adds a \"new index\" to a file. They share an inode. If the original file is removed, the file persists in storage because the secondary file created by a hard link still exists. Think \"different name, same file\"

\n

Symlinks are like pointers. A symlink points to the original file instead of the inode. If you remove the original file, the symlink breaks because it points to a file that points to an inode rather than simply pointing to an inode.

\n

Using links, we can make files more convenient to access as if we are \"copying\" files without actually copying files.

\n

Filename extensions

\n

On a UNIX system, file extensions are arbitrary. UNIX determines file type by reading the file headers. The file tells you exactly what type of file it is (just read it). The entire system does not break when a file extension doesn\'t match the expected contents of the file.

\n

Extensions only matter when you wilfully associate with the microsoft users leaving issues on your software repos. \"Not my OS, not my issue, it\'s open source so fork it if you don\'t like it\"

\n

Multiuser (timesharing)

\n

See also: Multitasking.

\n

Exercise 3: attempt to use Windows like a multiuser operating system and get back to me when you have realized that any and all claims made by microsoft about how their \"multi user enterprise system\" is in any way capable of competing with a genuine multi-user UNIX system are false advertising.

\n

Users, Groups

\n

A multiuser system needs a way to manage users and categorize them for access control purposes. Every user has a single user account and belongs to 0 or more groups. Sorting users into groups at the time of account creation makes is significantly easier than granting/revoking permissions user-by-user. Additionally, using something like rctl(8) on FreeBSD allows a systems administrator to allocate resources to specific users, groups, or login classes (like groups).

\n

Daemons (services)

\n

On a UNIX system, every process is owned by a user. In the case of a service, the process is owned by a daemon account. Daemon accounts have limited permissions and make it possible to run persistent services as a non-root user.

\n

Access Control

\n

Since UNIX was designed to be a multiuser system, access control is required. We know about users, we know about groups, but what about permissions?

\n

There are three types of operations that can be done to a file: read, write, and execute. Who can the admin grant these permissions to? The Owner, the Group, and the Other (all). This type of access control is called discretionary access control because the owner of the file can modify files at their own discretion.

\n

Actually using the thing

\n

Programming interface Pt. 1 (data streams)

\n

All UNIX utilities worth using use 3 data streams:

\n\n

Shell

\n

The shell is how a user actually interacts with a UNIX system. It\'s a familiar interface that allows a human user to interact with a computer using real human language.

\n

Explicitly telling the computer to do is infinitely less agonizing than dealing with a computer that tries to do what it thinks you want it to do by interpreting input from a poorly designed, overly engineered interface.

\n

The shell, in addition to being an interactive interface, is also scriptable. Although math is a struggle, shell scripting is a fairly simple way of automating tasks. Taping together interoperable commands you already know makes everything easier. My favorite aspect about writing POSIX shell scripts is knowing that shell is a strongly, statically typed language where the only datatype is string.

\n

Problem that are difficult or messy to solve in shell usually mean it\'s time to write another small C program for your specific needs. Adding the new program into the shell pipeline is trivial.

\n

Pipes

\n

Pipes, the concept that makes UNIX so scriptable. A shell utility that follows the UNIX philosophy will have a non-captive interface, write uncluttered data to stdout, read from stdin, and error to stderr. The | pipe character instructs programs to send their stdout to the next stdin in the pipeline instead of printing to the terminal.

\n

All standard command line utilities are interoperable and can be easily attached like building blocks. \"Meta programming\" has never been easier.

\n

Pipes make it so that every UNIX program is essentially a filter. Sure, you could just use awk, but I prefer shell.

\n

Bonus:

\n\n

Summary:

\n

UNIX is a non-simple modular operating system designed for 1970s big iron mainframes but we love it too much to let it go. Compared to minimal hobbyist operating systems, UNIX is BIG. Compared to commercial operating systems, free UNIX is small. Maybe slightly more than minimum viable but the papercuts are mild enough to forgive.

\n

See Also:

\n

The UNIX-HATERS Handbook

\n',406,0,1,'CC-BY-SA','UNIX',0,0,1), (3657,'2022-08-09','Small time sysadmin',1568,'How I maintain my Linux Box, Part One.','
    \n
  1. Creating Backups.
  2. \n
\n\n
#!/bin/bash\n#License: GPL v3\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\n#Name: getoverhere.sh\n#Purpose:\n#Version: beta 0.07\n#Author: SGOTI (Some Guy On The Internet)\n#Date: Sat 29 Jan 2022 02:19:29 AM EST\n\n#variables:\nVAR_TBALL=\nVAR_TARGET=\nVAR_JUMP=\nVAR_VALUE=\n\n#start:\ncat << "EOT01"\nOptions:\n    email |"${HOME}/.thunderbird/"\n    jop |"${HOME}/Documents/joplin"\n    dots |"${HOME}/.bashrc .vimrc .bash_aliases"\nEOT01\n\necho -e "What do you want to backup? : \\c."\nread VAR_VALUE\n\ncase ${VAR_VALUE} in\n    "email" )\nVAR_TBALL="INSERT_EMAIL_NAME$(date +%m-%d-%Y).tar.gz"\nVAR_TARGET="msgFilterRules.dat"\nVAR_JUMP="${HOME}/.thunderbird/*.default-release/ImapMail/imap.mail.yahoo.com/"\n    echo -e "Grabbing INSERT_EMAIL_NAME...\\n"\ntar -C ${VAR_JUMP} --create --file ${VAR_TBALL} --gzip ${VAR_TARGET}\n    sleep 1\n\nVAR_TBALL="INSERT_EMAIL_NAME$(date +%m-%d-%Y).tar.gz"\nVAR_TARGET="msgFilterRules.dat"\nVAR_JUMP="${HOME}/.thunderbird/*.default-release/ImapMail/imap.gmail.com/"\n    echo -e "Grabbing INSERT_EMAIL_NAME...\\n"\ntar -C ${VAR_JUMP} --create --file ${VAR_TBALL} --gzip ${VAR_TARGET}\n    sleep 1\n\nVAR_TBALL="EMAIL_ARCHIVES$(date +%m-%d-%Y).tar.gz"\nVAR_TARGET="Mail/"\nVAR_JUMP="${HOME}/.thunderbird/*.default-release/"\n    echo -e "Grabbing email EMAIL_ARCHIVES...\\n"\ntar -C ${VAR_JUMP} --create --file ${VAR_TBALL} --gzip ${VAR_TARGET}\n    echo -e "Creating List for ${VAR_TBALL}...\\n"\nls -lhAR --group-directories-first ${VAR_JUMP}${VAR_TARGET} > EMAIL_ARCHIVES$(date +%m-%d-%Y).txt\n    sleep 1\n\nVAR_TBALL="THUNDERBIRD_CALENDER$(date +%m-%d-%Y).tar.gz"\nVAR_TARGET="calenders/"\nVAR_JUMP="${HOME}/Documents/"\n    echo -e "Grabbing email THUNDERBIRD_CALENDER...\\n"\ntar -C ${VAR_JUMP} --create --file ${VAR_TBALL} --gzip ${VAR_TARGET}\n    echo -e "Creating List for ${VAR_TBALL}...\\n"\nls -lhAR --group-directories-first ${VAR_JUMP}${VAR_TARGET} > THUNDERBIRD_CALENDER$(date +%m-%d-%Y).txt\n    sleep 1\n\nVAR_TBALL="THUNDERBIRD_ADDRESS_BOOK$(date +%m-%d-%Y).tar.gz"\nVAR_TARGET="address-book/"\nVAR_JUMP="${HOME}/Documents/"\n    echo -e "Grabbing ${VAR_TARGET}...\\n"\ntar -C ${VAR_JUMP} --create --file ${VAR_TBALL} --gzip ${VAR_TARGET}\n    echo -e "Creating List for ${VAR_TBALL}...\\n"\nls -lhAR --group-directories-first ${VAR_JUMP}${VAR_TARGET} > THUNDERBIRD_ADDRESS_BOOK$(date +%m-%d-%Y).txt\n    sleep 1\n\nVAR_TBALL="THUNDERBIRD_ALL$(date +%m-%d-%Y).tar.gz"\nVAR_TARGET=".thunderbird/"\nVAR_JUMP="${HOME}/"\n    echo -e "Grabbing ${VAR_TARGET}...\\n"\ntar -C ${VAR_JUMP} --create --file ${VAR_TBALL} --gzip ${VAR_TARGET}\n    echo -e "Creating List for ${VAR_TBALL}...\\n"\nls -lhAR --group-directories-first ${VAR_JUMP}${VAR_TARGET} > THUNDERBIRD_ALL$(date +%m-%d-%Y).txt ;;\n\n    "jop" )\nVAR_TBALL="JOPLIN$(date +%m-%d-%Y).tar.gz"\nVAR_TARGET="joplin/"\nVAR_JUMP="${HOME}/Documents/"\n    echo "Grabbing ${VAR_TARGET}"\ntar -C ${VAR_JUMP} --create --file ${VAR_TBALL} --gzip ${VAR_TARGET}\n    sleep 1\n    echo -e "Creating List for ${VAR_TBALL}...\\n"\nls -lhAR --group-directories-first ${VAR_JUMP}${VAR_TARGET} > JOPLIN$(date +%m-%d-%Y).txt ;;\n\n    "dots" )\nVAR_TBALL="dots$(date +%m-%d-%Y).tar.gz"\nVAR_TARGET=".bashrc .vimrc .bash_aliases"\nVAR_JUMP="${HOME}/"\n    echo "Grabbing ${VAR_TARGET}"\ntar -v -C ${VAR_JUMP} --create --file ${VAR_TBALL} --gzip ${VAR_TARGET} ;;\n\n    * )\n    echo "Good Heavens..." ;;\nesac\nexit;\n
\n
\n
    \n
  1. Restoring from backups.
  2. \n
\n\n
VAR_TBALL="EMAIL_ARCHIVES*.tar.gz"\nVAR_JUMP="${HOME}/.thunderbird/*.default-release/"\n    echo -e "Restoring EMAIL_ARCHIVES...\\n"\ntar --extract --directory= ${VAR_JUMP} --file ${VAR_TBALL}\n    echo -e "EMAIL_ARCHIVES restored.\\n"\n
\n',391,0,0,'CC-BY-SA','sysadmin, system maintenance, tar, backups',0,0,1), (3664,'2022-08-18','Secret hat conversations',1070,'You\'ll need your tin hat for this one.','

The Tin Foil Hat often worn in the belief or hope that it shields the brain from threats such as electromagnetic fields, mind control, and mind reading.

\n
    \n
  1. Proper hat construction video. Also includes the “why” along with the “how”.
  2. \n
  3. Proper hat construction music. Just something to keep you focused.
  4. \n
\n
\n

FCC Caller ID Spoofing info: Spoofing is when a caller deliberately falsifies the information transmitted to your caller ID display to disguise their identity.

\n

FCC Call Blocking info: Call blocking is a tool used by phone companies to stop illegal and unwanted calls from reaching your phone. A second annual FCC report released in June 2021 found that many voice service providers and third-party analytics companies are improving their call blocking and labeling services and use new data to better detect robocalls. Billions of unwanted calls to American consumers are being blocked each year.

\n

The PinePhone Pro Explorer Edition is aimed at Linux developers with an extensive knowledge of embedded systems and/or experience with mobile Linux.

\n

Time-based one-time password (TOTP) is a computer algorithm that generates a one-time password (OTP) that uses the current time as a source of uniqueness. As an extension of the HMAC-based one-time password algorithm (HOTP), it has been adopted as Internet Engineering Task Force (IETF) standard RFC 6238.

\n

Matrix is an open standard for interoperable, decentralised, real-time communication over IP.

\n
\n

Password Managers: Used by Some Guy On The Internet.
\nBitwarden
\nKeePassXC

\n
\n',391,0,1,'CC-BY-SA','Tin hat, call spoofing',0,0,1), -(3936,'2023-09-04','HPR Community News for August 2023',0,'HPR Volunteers talk about shows released and comments posted in August 2023','',159,47,1,'CC-BY-SA','Community News',0,0,1), +(3936,'2023-09-04','HPR Community News for August 2023',0,'HPR Volunteers talk about shows released and comments posted in August 2023','\n\n

New hosts

\n

\nThere were no new hosts this month.\n

\n\n

Last Month\'s Shows

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
IdDayDateTitleHost
3912Tue2023-08-01Emergency Show: Biltong and RooibosShane Shennan
3913Wed2023-08-02Lurking Prion Q and ALurking Prion
3914Thu2023-08-03how to deal with blistersdnt
3915Fri2023-08-04Why the hell is my audio clipping?MrX
3916Mon2023-08-07HPR Community News for July 2023HPR Volunteers
3917Tue2023-08-08Response to \"Permission Tickets\" by oneofspoonsdnt
3918Wed2023-08-09Emacs package curation, part 3dnt
3920Fri2023-08-11RV Trip 2022-2023: Southeast USAhuka
3921Mon2023-08-14HPR AudioBook Club 23 - John Carter of Mars (Books 1-3)HPR_AudioBookClub
3930Fri2023-08-25Playing Civilization II Test of TimeAhuka
\n\n

Comments this month

\n\n

Note to Volunteers: Comments marked in green were read in the last\nCommunity News show and should be ignored in this one.

These are comments which have been made during the past month, either to shows released during the month or to past shows.\nThere is 1 comment in total.

\n

Past shows

\n

There is 1 comment on\n1 previous show:

\n

Updated on 2023-08-02 17:20:08

\n\n\n

Mailing List discussions

\n

\nPolicy decisions surrounding HPR are taken by the community as a whole. This\ndiscussion takes place on the Mail List which is open to all HPR listeners and\ncontributors. The discussions are open and available on the HPR server under\nMailman.\n

\n

The threaded discussions this month can be found here:

\nhttps://hackerpublicradio.org/pipermail/hpr_hackerpublicradio.org/2023-August/thread.html\n\n\n

Events Calendar

\n

With the kind permission of LWN.net we are linking to\nThe LWN.net Community Calendar.

\n

Quoting the site:

\n
This is the LWN.net community event calendar, where we track\nevents of interest to people using and developing Linux and free software.\nClicking on individual events will take you to the appropriate web\npage.
\n\n

Any other business

\n\n\n\n',159,47,1,'CC-BY-SA','Community News',0,0,1), (3666,'2022-08-22','One Weird Trick',997,'I talk about getting into or advancing in cybersecurity & how keyboards could trick malware.','

In this episode, I talk about getting in to the field of cybersecurity or moving up in the field. I also talk about how keyboards could keep malware from going Boom on your system.

\n

Links:

\n\n',405,74,1,'CC-BY-SA','cybersecurity,security,EvilSteve,malware, career',0,0,1), (3669,'2022-08-25','My First Podcast: My Journey into the Computer World',1207,'How I was introduced into computers, Linux, robotics, programming, cibersecurity and more...','

Milestones in my Journey

\n
    \n
  1. Studied Windows office and played online games
  2. \n
  3. Electronics
  4. \n
  5. Programming with Scratch
  6. \n
  7. Studied Javascript with Khan Academy
  8. \n
  9. Used Processing
  10. \n
  11. Learned Arduino and robotics
  12. \n
  13. Programmed with Visual Studio Code
  14. \n
  15. Learned Git
  16. \n
  17. Learned Windows Batch, VBS, registry, and others
  18. \n
  19. Introduction to Linux and disks with Tails
  20. \n
  21. Installation of Linux mint
  22. \n
  23. Installation of Debian
  24. \n
  25. Learned Apt, sudo, and other commands
  26. \n
  27. Discovered the Raspberry Pi
  28. \n
  29. Learned ssh, vnc, servers and networking with the Raspberry Pi
  30. \n
  31. Received a Thinkpad laptop and installed on it Bodhi Linux, Linux Lite and Alpine Linux
  32. \n
  33. Learned about erasure, recovery and encryption of data
  34. \n
  35. Learned more about Linux (Screen, network configuration, emacs, programming in C)
  36. \n
  37. Discovered Nethack and Open Adventure console games
  38. \n
  39. Studied hacking and pentesting
  40. \n
  41. Helped a company with its computers and learned from it guys
  42. \n
  43. Introduction to Python and BSD
  44. \n
\n',410,29,0,'CC-BY-SA','linux, programming, cibersecurity, robotics, hardware',0,0,1), (3678,'2022-09-07','\"Stupid Users\" ... no, not those users, the other \"stupid users\"',907,'Brady & I discuss stupid things done by those of us who really should know better.','

In this week\'s episode, I chat with R. Brady Frost about the little plumber vs the gigantic rock. Then we move in to a discussion about the fallacy of stupid users with some great stories of stupid things done by those of us who really should know better. The moral of the story, is that we are all human and nothing will ever change that. Instead, we need to be prepared for when humans are human.

\n

Links:

\n\n',405,74,1,'CC-BY-SA','cybersecurity,security,EvilSteve,users,stupid human tricks,customer service',0,0,1), @@ -20023,9 +20024,9 @@ INSERT INTO `eps` (`id`, `date`, `title`, `duration`, `summary`, `notes`, `hosti (3902,'2023-07-18','Introduction to a new series on FFMPEG',474,'In this episode, I introduce FFMPEG, media containers, and codecs','

Links

\n\n\n',300,0,0,'CC-BY-SA','ffmpeg,video streaming,audio streaming',0,0,1), (3903,'2023-07-19','Why I don\'t love systemd (yet)',396,'Klaatu reads a script by Deepgeek about systemd','

I\'ve been meaning to put down my thoughts about SystemD for the HPR\ncommunity for some while, so here goes.

\n

I want to say that I am not a SystemD hater. When SystemD was a hot\ntopic of debate, many became irrational over it, but I want to start by\nsaying that I don\'t think it\'s a bad technology. I think it is a rather\ngood technology. I just don\'t want it on my personal computer. So I\nwould like to run things down in this order: what is it (as in, what is\nit really,) what makes it a good technology, why I don\'t want it now\n(but might later,) and a few tips for you if you decide that you don\'t\nwant it currently.

\n

SystemD Is not an init system. SystemD includes an init system.\nSystemD Init was faster than SysVInit, but SystemD Init isn\'t the\nfastest init system, and SysVInit now has a parallelization helper, at\nleast on Debian.

\n

So, if SystemD Init is not SystemD, than what is SystemD? To\nunderstand this we must first understand something about Linux. Linux\noperates under a model where there are root processes, and there are\nuser processes. These two kinds of processes are usually called\n\"layers.\" SystemD is actually a third layer, that can be called a system\nlayer. So when SystemD is added to a Linux system, that changes the\nsystem so that there are three layers, a root layer, a user layer, and a\nsystem layer. As such, you now ask SystemD to set how the system runs.\nThis is why SystemD includes things like an init system, because if you\nwant to change what the system is running, you ask SystemD to change it.\nSystemD then messages an appropriate system to implement the change,\nlike messaging its init system to bring up or bring down a system\ndaemon. Once you play out this in your head a bit, you really realize\nthat SystemD acts more like a message passing system in this regard.

\n

So why do I say SystemD is a good technology? Because this can\nstandardize system control. Without SystemD a fleet of computers becomes\nlike individual fingerprints or unique snowflakes. If you manage many\ncomputers, as many professional IT people do, you want them to all run\nthe same, all have the same profiles and general configurations. So if\nyou have a bunch of computers you are running, you can run a lot more if\nthey are all run the same way. If your job requires you to run 10,000\nwebservers, you want them to run identically because it is impossible to\nkeep an understanding of 10,000 unique configurations in a human\nhead.

\n

SystemD really shines in its support of virtualization as well. So\nto speak of servers, I used to run an email server for a few friends.\nEach of us had a userid and number as unix users. The mapping of unix\nuserids and postfix userids can get confusing when it gets big. Thanks\nto SystemD\'s virtualization work, you can actually put a service like\nemail into a namespace situation so that it has only the users root and\nthe daemon user id (like \"postfix\"), so SystemD greatly enhances\nsecurity for server installations. This might help explain its\ndominance in linux distributions that have been traditionally\nserver-centric, such as debian and redhat.

\n

So why don\'t I don\'t want it? Well, I\'ve been doing a lot of talking\nabout professional computer work and corporate work environments, but I\nuse a \"Personal Computer\" as a hobby. I\'ve been out-of-industry for\ndecades now. And when I say \"Personal Computer\" I\'m not talking a\nhardware specification, rather I\'m talking about \"This is my personal\ncomputer where I do things my way, as opposed to my work computer where\nI do things my companies way\". Dear listener, please remember that I did\nthe first community show contribution to HPR, and my topic was about\npersonalization. For me, a hobbyist interested in operating system\nexperimentation, I don\'t want a system layer, I want a traditional\nunix-like system that operates on a two-layer model and does things my\nway, nobody else\'s way.

\n

So, what advice can I give to those who don\'t want SystemD now? Well,\nrecently I\'ve left Debian. Debian, you see, supports init system\ndiversity, but as you now know dear listener, that is different than\nbeing without SystemD. You may have heard that SystemD is\nlinux-specific, that is to say that it runs only on linux, not anything\nlike a BSD system or a Windows system. But you may be curious to know\nthat it is also Gnu-libC specific. Which means that the C compiler must\nuse GNU\'s libC standard library. Thus, if you have a system built around\nthe Musl C standard library like Alpine or Void, or a system like\nAndroid that runs on the Bionic C Standard library, you wont have a\nSystemD system. I\'m personally learning Void as its package manager\nsupports both binary and a ports collection much like the BSD\'s. But\nthat is what I\'m doing on my personal computer, I leave you in the\nfreedom to do things your way on your personal computer!

\n\n',73,99,0,'CC-BY-SA','systemd,linux',0,0,1), (3904,'2023-07-20','How to make friends',2861,'This topic is being actively researched. Not for production use.','

Show notes

\n\n

how to make a friend

\n

friendship requires communication.

\n\n

unfortunately, there's no clear point during this process at which you know you have made a friend. so you have to define what a friend is, to you, and then work toward that goal.

\n

Here are some examples of definitions for friendship. There is no right or wrong here, it's really just setting your own expectations and requirements:

\n\n

There's no official definition, so you must define it yourself.\nYour definition may differ from the other person's definition.\nYou might say \"we are best friends\" but they might say \"no, I already have a best friend, but you're a good friend\" and THAT'S OK.

\n

If it helps, classify what kinds of friends you have so you understand what kinds of relationships you are maintaining.\nCommunicate with your friends, even if it's only to let them know that you're bad at communicating on a regular basis, or ask them how frequently they need to communicate to maintain a healthy friendship.

\n',78,108,0,'CC-BY-SA','autism,friendship,relationship,social engineering',0,0,1), -(3905,'2023-07-21','Presenting Fred Black',1105,'I have a short talk to present Fred Black.','\n',309,0,0,'CC-BY-SA','school,podcasts,instrument,quiz',0,0,1), -(3906,'2023-07-24','The Oh No! News.',1741,'Sgoti discusses the threat of convenience.','

The Oh No! news.

\n

Oh No! News is Good\nNews.

\n\n
\n

InfoSec; the language\nof security.

\n\n
\n\n
\n\n',391,74,0,'CC-BY-SA','Oh No News, InfoSec, browser security, session tokens, session id',0,0,1); -INSERT INTO `eps` (`id`, `date`, `title`, `duration`, `summary`, `notes`, `hostid`, `series`, `explicit`, `license`, `tags`, `version`, `downloads`, `valid`) VALUES (3908,'2023-07-26','Emacs package curation, part 2',667,'Let\'s go through every single package installed in my Emacs configuration. File 2 of 3.','

We discuss the packages installed in the second of three files that\nmake up my emacs config.

\n
;;; init-base.el ---  The basics\n;;; Commentary:\n;;; Packages for my personal and work laptop, but not termux.\n\n;;; Code:\n\n;;;;;;;;;;;;;;;\n;;; Writing ;;;\n;;;;;;;;;;;;;;;\n\n;; Focused writing mode\n(use-package olivetti\n  :hook (olivetti-mode . typewriter-mode-toggle)\n  :bind ("C-x C-w" . olivetti-mode)\n  :custom (olivetti-body-width 64)\n  :config\n      (defvar-local typewriter-mode nil\n      "Typewriter mode, automatically scroll down to keep cursor in\n      the middle of the screen. Setting this variable explicitly will\n      not do anything, use typewriter-mode-on, typewriter-mode-off\n      and typewriter-mode-toggle instead.")\n      (defun typewriter-mode-on()\n      "Automatically scroll down to keep cursor in the middle of screen."\n        (interactive)\n        (setq-local typewriter-mode t)\n        (centered-cursor-mode +1))\n      (defun typewriter-mode-off()\n      "Automatically scroll down to keep cursor in the middle of screen."\n        (interactive)\n        (kill-local-variable 'typewriter-mode)\n        (centered-cursor-mode -1))\n      (defun typewriter-mode-toggle()\n        "Toggle typewriter scrolling mode on and off."\n        (interactive)\n        (if typewriter-mode (typewriter-mode-off) (typewriter-mode-on))))\n\n(use-package centered-cursor-mode)\n\n;; Check for weasel words and some other simple rules\n(use-package writegood-mode\n  :bind ("C-c g" . writegood-mode))\n\n;; spellchecking\n(use-package flyspell-correct\n  :after flyspell\n  :bind (:map flyspell-mode-map\n              ("C-;" . flyspell-correct-wrapper)))\n\n;; show correction options in a popup instead of the minibuffer\n(use-package flyspell-correct-popup\n  :after (flyspell-correct))\n\n;online thesaurus service from powerthesaurus.org\n(use-package powerthesaurus)\n\n;; WordNet Thesaurus replacement\n(use-package synosaurus\n  :custom (synosaurus-choose-method 'default)\n  :config (when window-system\n            (if (string= (x-server-vendor) "Microsoft Corp.")\n              (setq synosaurus-wordnet--command "C:\\\\Program Files (x86)\\\\WordNet\\\\2.1\\\\bin\\\\wn.exe"))))\n\n;; WordNet search and view\n(use-package wordnut\n  :bind ("C-c s" . wordnut-search)\n  :config (when window-system\n            (if (string= (x-server-vendor) "Microsoft Corp.")\n                (setq wordnut-cmd "C:\\\\Program Files (x86)\\\\WordNet\\\\2.1\\\\bin\\\\wn.exe"))))\n\n;; fill and unfill with the same key\n(use-package unfill\n  :bind ("M-q" . unfill-toggle))\n\n;; Markdown...\n(use-package markdown-mode)\n\n;;;;;;;;;;;;;;\n;;; Coding ;;;\n;;;;;;;;;;;;;;\n\n;; Syntax checking\n(use-package flycheck\n  :diminish\n  :init (global-flycheck-mode))\n\n(use-package flycheck-popup-tip\n  :after (flycheck)\n  :hook (flycheck-mode-hook . flycheck-popup-tip-mode))\n\n;; Web design\n(use-package emmet-mode\n  :hook (sgml-mode . emmet-mode) ;; Auto-start on any markup modes\n        (css-mode . emmet-mode)) ;; enable Emmet's css abbreviation.\n\n(use-package sass-mode)\n\n(use-package web-mode)\n\n;; Python\n(use-package python\n  :mode ("\\\\.py\\\\'" . python-mode)\n  :interpreter ("python" . python-mode))\n\n;; highlight todo items everywhere\n(use-package hl-todo\n  :straight (:host github :repo "tarsius/hl-todo")\n  :custom (hl-todo-keyword-faces\n             `(("FIXME" error bold)\n             ("STUB" error bold)\n             ("REPLACETHIS" error bold)\n             ("REVISIT" error bold)))\n          (hl-todo-exclude-modes nil)\n  :config (add-to-list 'hl-todo-include-modes 'org-mode)\n  :init (global-hl-todo-mode))\n\n;; git\n(use-package magit)\n\n(use-package git-timemachine)\n\n;; rest APIs via org source block\n(use-package ob-restclient)\n\n;;; END ;;;\n\n(provide 'init-base)\n;;; init-base.el ends here
\n',399,0,0,'CC-BY-SA','emacs,elisp',0,0,1), +(3905,'2023-07-21','Presenting Fred Black',1105,'I have a short talk to present Fred Black.','\n',309,0,0,'CC-BY-SA','school,podcasts,instrument,quiz',0,0,1); +INSERT INTO `eps` (`id`, `date`, `title`, `duration`, `summary`, `notes`, `hostid`, `series`, `explicit`, `license`, `tags`, `version`, `downloads`, `valid`) VALUES (3906,'2023-07-24','The Oh No! News.',1741,'Sgoti discusses the threat of convenience.','

The Oh No! news.

\n

Oh No! News is Good\nNews.

\n\n
\n

InfoSec; the language\nof security.

\n\n
\n\n
\n\n',391,74,0,'CC-BY-SA','Oh No News, InfoSec, browser security, session tokens, session id',0,0,1), +(3908,'2023-07-26','Emacs package curation, part 2',667,'Let\'s go through every single package installed in my Emacs configuration. File 2 of 3.','

We discuss the packages installed in the second of three files that\nmake up my emacs config.

\n
;;; init-base.el ---  The basics\n;;; Commentary:\n;;; Packages for my personal and work laptop, but not termux.\n\n;;; Code:\n\n;;;;;;;;;;;;;;;\n;;; Writing ;;;\n;;;;;;;;;;;;;;;\n\n;; Focused writing mode\n(use-package olivetti\n  :hook (olivetti-mode . typewriter-mode-toggle)\n  :bind ("C-x C-w" . olivetti-mode)\n  :custom (olivetti-body-width 64)\n  :config\n      (defvar-local typewriter-mode nil\n      "Typewriter mode, automatically scroll down to keep cursor in\n      the middle of the screen. Setting this variable explicitly will\n      not do anything, use typewriter-mode-on, typewriter-mode-off\n      and typewriter-mode-toggle instead.")\n      (defun typewriter-mode-on()\n      "Automatically scroll down to keep cursor in the middle of screen."\n        (interactive)\n        (setq-local typewriter-mode t)\n        (centered-cursor-mode +1))\n      (defun typewriter-mode-off()\n      "Automatically scroll down to keep cursor in the middle of screen."\n        (interactive)\n        (kill-local-variable 'typewriter-mode)\n        (centered-cursor-mode -1))\n      (defun typewriter-mode-toggle()\n        "Toggle typewriter scrolling mode on and off."\n        (interactive)\n        (if typewriter-mode (typewriter-mode-off) (typewriter-mode-on))))\n\n(use-package centered-cursor-mode)\n\n;; Check for weasel words and some other simple rules\n(use-package writegood-mode\n  :bind ("C-c g" . writegood-mode))\n\n;; spellchecking\n(use-package flyspell-correct\n  :after flyspell\n  :bind (:map flyspell-mode-map\n              ("C-;" . flyspell-correct-wrapper)))\n\n;; show correction options in a popup instead of the minibuffer\n(use-package flyspell-correct-popup\n  :after (flyspell-correct))\n\n;online thesaurus service from powerthesaurus.org\n(use-package powerthesaurus)\n\n;; WordNet Thesaurus replacement\n(use-package synosaurus\n  :custom (synosaurus-choose-method 'default)\n  :config (when window-system\n            (if (string= (x-server-vendor) "Microsoft Corp.")\n              (setq synosaurus-wordnet--command "C:\\\\Program Files (x86)\\\\WordNet\\\\2.1\\\\bin\\\\wn.exe"))))\n\n;; WordNet search and view\n(use-package wordnut\n  :bind ("C-c s" . wordnut-search)\n  :config (when window-system\n            (if (string= (x-server-vendor) "Microsoft Corp.")\n                (setq wordnut-cmd "C:\\\\Program Files (x86)\\\\WordNet\\\\2.1\\\\bin\\\\wn.exe"))))\n\n;; fill and unfill with the same key\n(use-package unfill\n  :bind ("M-q" . unfill-toggle))\n\n;; Markdown...\n(use-package markdown-mode)\n\n;;;;;;;;;;;;;;\n;;; Coding ;;;\n;;;;;;;;;;;;;;\n\n;; Syntax checking\n(use-package flycheck\n  :diminish\n  :init (global-flycheck-mode))\n\n(use-package flycheck-popup-tip\n  :after (flycheck)\n  :hook (flycheck-mode-hook . flycheck-popup-tip-mode))\n\n;; Web design\n(use-package emmet-mode\n  :hook (sgml-mode . emmet-mode) ;; Auto-start on any markup modes\n        (css-mode . emmet-mode)) ;; enable Emmet's css abbreviation.\n\n(use-package sass-mode)\n\n(use-package web-mode)\n\n;; Python\n(use-package python\n  :mode ("\\\\.py\\\\'" . python-mode)\n  :interpreter ("python" . python-mode))\n\n;; highlight todo items everywhere\n(use-package hl-todo\n  :straight (:host github :repo "tarsius/hl-todo")\n  :custom (hl-todo-keyword-faces\n             `(("FIXME" error bold)\n             ("STUB" error bold)\n             ("REPLACETHIS" error bold)\n             ("REVISIT" error bold)))\n          (hl-todo-exclude-modes nil)\n  :config (add-to-list 'hl-todo-include-modes 'org-mode)\n  :init (global-hl-todo-mode))\n\n;; git\n(use-package magit)\n\n(use-package git-timemachine)\n\n;; rest APIs via org source block\n(use-package ob-restclient)\n\n;;; END ;;;\n\n(provide 'init-base)\n;;; init-base.el ends here
\n',399,0,0,'CC-BY-SA','emacs,elisp',0,0,1), (3918,'2023-08-09','Emacs package curation, part 3',864,'Let\'s go through every single package installed in my Emacs configuration. The last one.','

We discuss the packages installed in the second of three files that\nmake up my emacs config.

\n

Since recording, I pulled in some EXWM (the Emacs X Window Manager,\nthat\'s right), even though I\'m not actually using it, I\'m still using\nstumpWM.

\n

I have also added pass, the password manager, khardel, an emacs\npackage for the khard CLI address book application.

\n

I also moved (server-start) to this file, so that it\'ll only happen\nwhen I\'m on linux.

\n
;;; init-extra.el --- Extra init stuff\n;;; Commentary:\n;;; Stuff just for my personal laptop, not for my work laptop or termux, for example.\n\n;;; Code:\n\n;;;;;;;;;;;;;;;;\n;;; org-roam ;;;\n;;;;;;;;;;;;;;;;\n\n(use-package org-roam\n  :demand t\n  :straight (:host github :repo "org-roam/org-roam"\n             :files (:defaults "extensions/*"))\n  :custom (org-roam-mode-sections (list #'org-roam-backlinks-section\n                                        #'org-roam-reflinks-section\n                                        #'org-roam-unlinked-references-section))\n  :init (setq org-roam-directory "~/org/roam/"\n              org-roam-capture-templates\n                 '(("o" "outline" plain\n                     "%?"\n                     :if-new\n                     (file+head "${slug}.org" "#+title: ${title}\\n#+filetags: :outline:\\n")\n                     :immediate-finish t\n                     :unnarrowed t)\n                  ("r" "reference" plain "%?"\n                     :if-new\n                     (file+head "${slug}.org" "#+title: ${title}\\n")\n                     :immediate-finish t\n                     :unnarrowed t)\n                  ("m" "memo" entry "* ${title}\\n%?"\n                     :if-new\n                     (file "memos.org")\n                     :immediate-finish t\n                     :unnarrowed t)))\n  :bind (("C-c n l" . org-roam-buffer-toggle)\n         ("C-c n f" . org-roam-node-find)\n         ("C-c n g" . org-roam-graph)\n         ("C-c n i" . org-roam-node-insert)\n         ("C-c n c" . org-roam-capture)\n         ;; Dailies\n         ("C-c n j" . org-roam-dailies-capture-today))\n  :config\n  ;; If you're using a vertical completion framework, you might want a more informative completion interface\n  (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag)))\n  (org-roam-db-autosync-mode)\n  ;; If using org-roam-protocol\n  (require 'org-roam-protocol))\n\n;; citations\n(use-package citar\n  :after org-roam\n  :custom (org-cite-insert-processor 'citar)\n          (org-cite-follow-processor 'citar)\n          (org-cite-activate-processor 'citar)\n          (citar-bibliography '("~/org/biblio.bib"))\n          (citar-notes-paths '("~/org/roam"))\n          (citar-file-note-extensions '("org"))\n  :hook (LaTeX-mode . citar-capf-setup)\n        (org-mode . citar-capf-setup)\n  :bind (("C-c n b" . #'citar-open-notes)\n          :map org-mode-map :package org\n          ("C-c b" . #'org-cite-insert)))\n\n;; view your org-roam notes on a map\n(use-package org-roam-ui\n  :after org-roam\n  :custom (org-roam-ui-sync-theme t)\n          (org-roam-ui-follow t)\n          (org-roam-ui-update-on-save t)\n          (org-roam-ui-open-on-start t))\n\n;; archive web pages in org attachments\n(use-package org-board\n  :after org\n  :custom (org-board-default-browser #'browse-url)\n          (org-board-property "ROAM_REFS")\n  :bind (:map org-mode-map\n          ("C-c B a" . org-board-archive)\n          ("C-c B o" . org-board-open)\n          ("C-c B D" . org-board-delete-all)))\n\n;;;;;;;;;;;;;;;\n;;; Writing ;;;\n;;;;;;;;;;;;;;;\n\n; something like grammarly, but open source\n(use-package langtool)\n\n;; better than docview, for pdf\n(use-package pdf-tools)\n\n;; annotating docs in org files\n(use-package org-noter)\n\n;; epub\n(use-package nov\n :mode ("\\\\.epub$" . nov-mode))\n\n;;; Invoke quick emacs windows to edit anything anywhere.\n;;; bind a key in xorg to ~emacsclient -c (emacs-everywhere)~\n(use-package emacs-everywhere)\n\n;;;;;;;;;;;;;;\n;;; Auctex ;;;\n;;;;;;;;;;;;;;\n(straight-use-package '( auctex\n  :host nil :repo "https://git.savannah.gnu.org/git/auctex.git"\n  :pre-build (("./autogen.sh")\n                  ("./configure" "--without-texmf-dir" "--with-lispdir=.")\n                  ("make"))))\n\n  (setq TeX-data-directory (expand-file-name "straight/repos/auctex" user-emacs-directory)\n      TeX-lisp-directory TeX-data-directory)\n\n  (eval-after-load 'info\n      '(add-to-list 'Info-additional-directory-list\n          (expand-file-name "straight/repos/auctex/doc" user-emacs-directory)))\n  (load (expand-file-name "straight/repos/auctex/auctex.el" user-emacs-directory) nil t t)\n  (load (expand-file-name "straight/repos/auctex/preview-latex.el" user-emacs-directory) nil t t)\n\n(use-package evil-tex)\n\n(use-package latex-preview-pane\n  :custom (latex-preview-pane-use-frame t))\n\n(use-package adaptive-wrap)\n\n;;; END AUCTEX ;;;\n\n;;;;;;;;;;;;;;;;;;;\n;;; Programming ;;;\n;;;;;;;;;;;;;;;;;;;\n\n;; downloading and viewing Dash documentation files\n(use-package dash-docs\n  :init (defun elisp-doc ()\n            (setq-local consult-dash-docsets '("Emacs Lisp")))\n        (add-hook 'emacs-lisp-mode-hook 'elisp-doc)\n  :custom (dash-docs-docsets-path (expand-file-name "docsets" user-emacs-directory))\n          (dash-docs-browse-func 'eww))\n\n(use-package consult-dash\n  :straight (:host codeberg :repo "rahguzar/consult-dash")\n  :bind (("M-s d" . consult-dash))\n  :after consult\n  :config\n  ;; Use the symbol at point as initial search term\n  (consult-customize consult-dash :initial (thing-at-point 'symbol)))\n\n;;;;;;;;;;;;;\n;;; Email ;;;\n;;;;;;;;;;;;;\n\n(use-package notmuch\n  :commands notmuch\n  :config (defun notmuch-show-view-html ()\n            "Open the text/html part of the current message using\n            `notmuch-show-view-part'. From https://emacs.stackexchange.com/a/63457"\n            (interactive)\n            (save-excursion\n                (goto-char (prop-match-beginning\n                            (text-property-search-forward\n                            :notmuch-part "text/html"\n                            (lambda (value notmuch-part)\n                                (equal (plist-get notmuch-part :content-type)\n                            value)))))\n            (notmuch-show-view-part)))\n          ;; Enable link to message via org-store-link\n          (load-file (expand-file-name "org-notmuch.el" user-emacs-directory))\n          (require 'org-notmuch)\n  :bind (:map notmuch-show-mode-map\n              (". v" . notmuch-show-view-html))\n  :custom (notmuch-draft-folder "local/drafts")\n          (notmuch-search-oldest-first nil)\n          (notmuch-fcc-dirs "fastmail/sent")\n          (notmuch-tagging-keys '(("r" ("+receipt" "-inbox") "Receipt")))\n          (sendmail-program (executable-find "msmtp"))\n          (message-sendmail-f-is-evil t)\n          (message-sendmail-extra-arguments '("--read-envelope-from")))\n\n(use-package khardel\n  :after notmuch\n  :bind (:map notmuch-message-mode-map\n         ("C-c M-k" . khardel-insert-email)))\n\n;;;;;;;;;;;;\n;;; PASS ;;;\n;;;;;;;;;;;;\n\n(use-package pass)\n\n;;;;;;;;;;;;\n;;; EXWM ;;;\n;;;;;;;;;;;;\n\n(use-package xelb\n  :disabled t\n  :straight (:host github :repo "ch11ng/xelb"))\n\n(use-package exwm\n  :disabled t\n  :straight (:host github :repo "ch11ng/exwm")\n  :defer t\n  :config (require 'exwm-systemtray)\n          (require 'exwm-randr)\n          (setq xcb:connection-timeout 20)\n          (exwm-systemtray-enable)\n          (add-hook 'exwm-update-class-hook\n                  (lambda ()\n                  (exwm-workspace-rename-buffer exwm-class-name)))\n          (add-hook 'exwm-randr-screen-change-hook\n                    (lambda ()\n                      (start-process-shell-command\n                       "autorandr" nil "autorandr -c")))\n          (defun exwm-randr-mobile()\n          "Load a xrandr profile to use only the laptop screen."\n          (interactive)\n          (start-process-shell-command "xrandr" nil "xrandr --output eDP-1 --auto --output DP-1 --off"))\n          (defun exwm-randr-docked()\n          "Load a xrandr profile to use only the connected external screen DP-1."\n          (interactive)\n          (start-process-shell-command "xrandr" nil "xrandr --output eDP-1 --off --output DP-1 --auto"))\n          (defun exwm-randr-chair()\n          "Load a xrandr profile to use both the laptop screen and the connected screen."\n          (interactive)\n          (start-process-shell-command "xrandr" nil "xrandr --output HDMI-1 --auto --scale 1.3 --output eDP-1 --off"))\n          (defun exwm-randr-all()\n          "Load a xrandr profile to use both the laptop screen and the connected screen."\n          (interactive)\n          (start-process-shell-command "xrandr" nil "xrandr --output eDP-1 --primary --output DP-1 --above eDP-1")\n          (setq exwm-randr-workspace-output-plist '(0 "eDP-1" 1 "DP-1"))\n          )\n          (exwm-randr-enable)\n    :custom (exwm-input-global-keys\n              `((,(kbd "s-r") . exwm-reset)\n                (,(kbd "s-w") . exwm-workspace-switch)\n                (,(kbd "s-a") . exwm-randr-all)\n                (,(kbd "s-c") . exwm-randr-chair)\n                (,(kbd "s-d") . exwm-randr-docked)\n                (,(kbd "s-m") . exwm-randr-mobile)\n                (,(kbd "s-k") . exwm-input-release-keyboard)\n                (,(kbd "s-f") . exwm-layout-toggle-fullscreen)\n                (,(kbd "s-p") . pass)\n                (,(kbd "s-t") . exwm-workspace-switch-to-buffer)\n                (,(kbd "s-&") . (lambda (command)\n                                       (interactive (list (read-shell-command "$ ")))\n                                       (start-process-shell-command command nil command)))\n                ,@(mapcar (lambda (i)\n                       `(,(kbd (format "s-%d" i)) .\n                           (lambda ()\n                               (interactive)\n                               (exwm-workspace-switch-create ,i))))\n                     (number-sequence 0 9))\n                ))\n          )\n\n;; start emacs server\n(server-start)\n\n;;; END ;;;\n\n(provide 'init-extra)\n;;; init-extra.el ends here
\n',399,0,0,'CC-BY-SA','emacs,elisp',0,0,1), (3909,'2023-07-27','Permission tickets. ',688,'Collective delusions of elective conclusions. ','

No special knowledge nor resources.
\nThis is a preview show for some future, self referential tangle of\ncryptographic distraction.

\n

So far, I see money as some social credit by proxy.
\nI recognise the utility of keeping track of resource recipes.
\nI also see dangers in over abstracting relations beyond robustly\nprovable outcomes.

\n',398,0,1,'CC-BY-SA','ledger,cryptographic,consensus,permission,integrity',0,0,1), (3911,'2023-07-31','An overview of the \'ack\' command',1255,'A Perl-based \'grep\'-like tool that can search by file type','
\n

Introduction

\n

I have occasionally been using a tool called ack for a\nfew years now. It’s billed as “an alternative to grep for\nprogrammers”.

\n

There are several features I find particularly useful:

\n\n

It is a very comprehensive and useful tool, though maybe quite\ncomplex to use. Personally I use it in special cases where I need its\npower, and otherwise use the usual grep.

\n

In this episode I will give you the flavour of its capabilities and\notherwise leave you to research more if it sounds interesting.

\n

Installing ack

\n

The tool can be found in repositories. I use Debian, and\nack is in the Debian repo and can be installed with:

\n
sudo apt install ack
\n

Installing it this way the version I have (and am describing here) is\n3.6.0. There is a new version, 3.7.0 available from the website.

\n

The documentation on the website suggests installing it as a Perl\nmodule using CPAN, which is something I will do soon I\nthink.

\n

Perl regular expressions

\n

These are very sophisticated.

\n

A project to convert the Perl regular expression capabilities into a\nportable library form was undertaken by Philip Hazel of Cambridge\nUniversity in 1997, and was called Perl Compatible Regular\nExpressions or PCRE.

\n

Philip Hazel was the originator of the exim mail\ntransfer agent (MTA, or mail server), and wanted to use PCRE within\nit.

\n

Since then PCRE (and later PCRE2) is the way regular expressions are\nimplemented in a lot of other software, which shows how widespread use\nof the Perl RE has become.

\n

The ack documentation refers to the Perl manual for\ndetails of this type of regular expression, and to a tutorial, if you\nwish to gain a deeper understanding.

\n

It should be noted that GNU grep can use Perl compatible\nregular expressions when matching lines in files, but this feature is\nmarked as experimental.

\n

File types

\n

The ack command has rules for recognising file types. It\ndoes this by looking at the name extensions (\'.html\' or\n\'.py\' for example), and in some cases by examining their\ncontents. The complete list of types can be found by running:

\n
ack --help-types
\n

… or, for a more detailed but less readable list:

\n
ack --dump
\n

Some examples are:

\n\n

These names can be used with the options -t TYPE and\n--type=TYPE and also by simply preceding them with two\ndashes (--TYPE). There are also ways of requesting files\nnot of a given type: -T TYPE, --type=noTYPE\nand --noTYPE.

\n

To check files in the current directory of type shell an\nack command like the following might be used and the\nfollowing type of output produced:

\n
$ ack --shell declare\nBash_snippet__using_coproc_with_SQLite/examples/coproc_test.sh\n11:declare -a com=('date +%F' 'whoami' 'id' 'echo "$BASH_VERSION"'
\n

Note that ack reports the file path and numbered lines\nwithin it that match.

\n

You can add your own file types to ack. There is a\nconfiguration file called .ackrc in which new types can be\ndeclared. See below for more information.

\n

The file type feature is one that makes me use ack again\nand again.

\n

The .ackrc file

\n

This file contains “command-line options that are prepended to\nthe command line before processing”.

\n

It’s a useful way to add new types (or even modify existing\nones).

\n

It can be located in a number of places. Mine is\n~/.ackrc with other configuration files in my home\ndirectory.

\n

It’s possible to generate a new .ackrc with the option\n--create-ackrc. This saves all the default settings in the\nfile which makes it simple to adjust anything you need to change.

\n

As an example of a change, I have Markdown files with the extension\n.mkd. However, by default ack only recognises\n.md, and .markdown. To add .mkd\nto the list I can add one of the following to the\n.ackrc:

\n
# Either add `.mkd` to the list\n--type-add=markdown:ext:mkd\n# or replace the list with a new one\n--type-set=markdown:ext:md,mkd,markdown
\n

Note that lines beginning with # are comments. Note also\nthat --type-add and --type-set have to be\nfollowed by an = sign, not a space in this file.

\n

If you examine the settings with ack --dump you will see\nthe default command and the one you have added. If you use\nack --help-types you will see the new extension added to\nthe default list.

\n
markdown     .md .markdown; .mkd
\n

If I use this to search files in the directory where I keep my HPR\nepisodes I see:

\n
$ ack --markdown 'inner ear'\nHacking_my_inner_ear/hpr2109_full_shownotes.mkd\n24:became fascinated by the structure of the human [inner ear][2], and studied it\n28:The human inner ear performs two major functions:\n.\n.\n.
\n

Quick review of selected\nack options

\n

Usage

\n

The ack command is designed to be similar in as many\nrespects as possible to grep. The command is used in\ngeneral as follows:

\n
ack [OPTION]... PATTERN [FILES OR DIRECTORIES]
\n

The [OPTION] part denotes any options (some discussed\nbelow) and PATTERN is the PCRE search pattern. There are\nsome cases where this must be omitted - such as when files of a\nparticular type are being listed. See example 1 below for such a\ncase.

\n

In some cases a particular file is being searched, or all files in\ncertain directories, and that is what\n[FILES OR DIRECTORIES] denotes.

\n

The full documentation for ack can be seen with the\nusual man ack command, and also using\nack --man. There is also an option --help\nwhich gives a summary of all of the available options.

\n

Options

\n

There are many options specific to ack and some in\ncommon with grep, and we’ll look at just a few here:

\n\n

Examples

\n

1. Find all Markdown\nfiles in a directory

\n

Using the -f option:

\n
$ ack --markdown -f Nitecore_Tube_torch/\nNitecore_Tube_torch/README.mkd\nNitecore_Tube_torch/container.mkd\nNitecore_Tube_torch/index.mkd\nNitecore_Tube_torch/shownotes.mkd
\n

Using the -g option:

\n
$ ack -g '\.mkd$' Nitecore_Tube_torch/\nNitecore_Tube_torch/README.mkd\nNitecore_Tube_torch/container.mkd\nNitecore_Tube_torch/index.mkd\nNitecore_Tube_torch/shownotes.mkd
\n

2. Names\nof files that contain a match, with a match count

\n

Using the -l and -c options:

\n
$ ack --markdown -lci '\bear\b'\nHacking_my_inner_ear/hpr2109_full_shownotes.mkd:11\nHacking_my_inner_ear/shownotes.mkd:3\nAn_overview_of_the_ack_command/shownotes.mkd:6
\n

The sequence \'\b\' in Perl regular expressions is a\nboundary such as a word boundary. So the pattern is looking for the word\n\'ear\' as opposed to the characters \'ear\' (as\nin \'pearl\' for example).

\n

Note how the single-letter options -l, -c\nand -i can be concatenated.

\n

3. Searching for words in\na simpler way

\n

In example 2 the \b boundaries ensured the pattern\nmatched words rather than letter sequences. This can be simplified by\nusing the -w option:

\n
$ ack --markdown -lci -w 'ear'\nHacking_my_inner_ear/hpr2109_full_shownotes.mkd:11\nHacking_my_inner_ear/shownotes.mkd:3\nAn_overview_of_the_ack_command/shownotes.mkd:6
\n

Links

\n\n\n\n
\n',225,11,1,'CC-BY-SA','search,grep,regular expression,Perl',0,0,1), @@ -20953,4 +20954,4 @@ UNLOCK TABLES; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2023-08-02 5:52:30 +-- Dump completed on 2023-08-02 19:08:42