diff --git a/sql/hpr.sql b/sql/hpr.sql index 2f45cba..6823e9c 100644 --- a/sql/hpr.sql +++ b/sql/hpr.sql @@ -11806,14 +11806,38 @@ INSERT INTO `assets` (`episode_id`, `filename`, `extension`, `size`, `sha1sum`, (3882,'hpr3882.flac','flac',54360165,'e60818c0a46437e1179d93996eb74d7271fb8a29','audio/flac; charset=binary','setgid FLAC audio bitstream data, 16 bit, mono, 192 kHz, 136909306 samples'), (3882,'hpr3882.opus','opus',6727905,'9be328c07dbe2b1d64aaaf6f4cff328e3f05e613','audio/ogg; charset=binary','setgid Ogg data, Opus audio,'), (3882,'hpr3882.wav','wav',273820004,'6fdc5731efabab479eb01e8c2586024df7f41dc2','audio/x-wav; charset=binary','setgid RIFF (little-endian) data, WAVE audio, mono 192000 Hz'), +(3957,'hpr3957.wav','wav',876180156,'7ae670cd41eef0f2540c2b6bc70250409c094610','audio/x-wav; charset=binary','setgid RIFF (little-endian) data, WAVE audio, mono 192000 Hz'), +(3957,'hpr3957.opus','opus',21949557,'b83f0ae187c15a30845f5ce055aa6a3f982cea86','audio/ogg; charset=binary','setgid Ogg data, Opus audio,'), +(3957,'hpr3957.spx','spx',8618516,'56d18d30f836c959a9959cb2c123bb6c6b63b8ab','audio/ogg; charset=binary','setgid Ogg data, Speex audio'), +(3957,'hpr3957.flac','flac',174961358,'8b24330135fb91e94b2d03bb3ed3b9f9fe0bb489','audio/flac; charset=binary','setgid FLAC audio bitstream data, 16 bit, mono, 192 kHz, 438089374 samples'), +(3957,'hpr3957.mp3','mp3',18255657,'cd54e970f5f90c34a3367ea90f4a6a0a35f9bee3','audio/mpeg; charset=binary','setgid Audio file with ID3 version 2.4.0, contains:MPEG ADTS, layer III, v1, 64 kbps, 48 kHz, Monaural'), +(3957,'hpr3957.ogg','ogg',21949295,'18cd16109ac4659deab61664d780098dde05969f','audio/ogg; charset=binary','setgid Ogg data, Opus audio,'), +(3946,'hpr3946.wav','wav',863640946,'b82bdc6991690a5954a1e0d6d21ea83563041c6c','audio/x-wav; charset=binary','setgid RIFF (little-endian) data, WAVE audio, mono 192000 Hz'), +(3946,'hpr3946.opus','opus',19130700,'0345a5aedd68b7d8f5bdffa88b5480f5f586f45a','audio/ogg; charset=binary','setgid Ogg data, Opus audio,'), +(3946,'hpr3946.spx','spx',8495296,'fe98669d6c6d5030fab01611e7c2417fbcdb8b12','audio/ogg; charset=binary','setgid Ogg data, Speex audio'), +(3946,'hpr3946.flac','flac',184333617,'abea9fdf2d25d2ce71e164ea07143960e08287ed','audio/flac; charset=binary','setgid FLAC audio bitstream data, 16 bit, mono, 192 kHz, 431819747 samples'), +(3946,'hpr3946.ogg','ogg',19130394,'a7408a48c16c06c65150a9070938bdca572d52cc','audio/ogg; charset=binary','setgid Ogg data, Opus audio,'), +(3942,'hpr3942.wav','wav',324135458,'1b90fa72c70ed23793134e0ecd57c37d58561a1f','audio/x-wav; charset=binary','setgid RIFF (little-endian) data, WAVE audio, mono 192000 Hz'), +(3946,'hpr3946.mp3','mp3',17994389,'8f558d4568882fa6adf04141559d2f7f36b6ba04','audio/mpeg; charset=binary','setgid Audio file with ID3 version 2.4.0, contains:MPEG ADTS, layer III, v1, 64 kbps, 48 kHz, Monaural'), +(3942,'hpr3942.opus','opus',7645328,'420230016703dc094ff690957f12f90d7580b20a','audio/ogg; charset=binary','setgid Ogg data, Opus audio,'), +(3942,'hpr3942.flac','flac',65482564,'ca36f68fea879e7a481deafe658fd98382976065','audio/flac; charset=binary','setgid FLAC audio bitstream data, 16 bit, mono, 192 kHz, 162067018 samples'), +(3942,'hpr3942.ogg','ogg',7645052,'7b6280dd56626d79035466666199e5f66cb98868','audio/ogg; charset=binary','setgid Ogg data, Opus audio,'), +(3942,'hpr3942.spx','spx',3188656,'3c19b9b821cc36ecd60f5f5a89f5ccd2b07f260b','audio/ogg; charset=binary','setgid Ogg data, Speex audio'), +(3942,'hpr3942.mp3','mp3',6754679,'ed6becf89fc3fb0abbba3ab914c8a1987d32d932','audio/mpeg; charset=binary','setgid Audio file with ID3 version 2.4.0, contains:MPEG ADTS, layer III, v1, 64 kbps, 48 kHz, Monaural'), +(3934,'hpr3934.wav','wav',911373934,'1776753e84c8a0be17dbf6fca2ea9e848a6a121c','audio/x-wav; charset=binary','setgid RIFF (little-endian) data, WAVE audio, mono 192000 Hz'), +(3934,'hpr3934.opus','opus',22320991,'83f298b6fe4c66645476db40d991d154548de845','audio/ogg; charset=binary','setgid Ogg data, Opus audio,'), +(3934,'hpr3934.flac','flac',170375568,'d4ad5b04b18291da2b7fcc7e00ad84bb803194c6','audio/flac; charset=binary','setgid FLAC audio bitstream data, 16 bit, mono, 192 kHz, 455686257 samples'), +(3934,'hpr3934.spx','spx',8964737,'2afca0dd349858fbe4b2373abc06ea39b00a7437','audio/ogg; charset=binary','setgid Ogg data, Speex audio'), +(3934,'hpr3934.ogg','ogg',22320717,'7d9b7b41854b213a5404e6d98b4b6147a6a55a63','audio/ogg; charset=binary','setgid Ogg data, Opus audio,'), +(3934,'hpr3934.mp3','mp3',18988917,'1caba7d0b12331e6508ee382d471d79d73352dbc','audio/mpeg; charset=binary','setgid Audio file with ID3 version 2.4.0, contains:MPEG ADTS, layer III, v1, 64 kbps, 48 kHz, Monaural'), (3965,'hpr3965.wav','wav',140494478,'41607bc8e018310f438f32810de3cd38c023ac88','audio/x-wav; charset=binary','setgid RIFF (little-endian) data, WAVE audio, mono 192000 Hz'), (3965,'hpr3965.opus','opus',3113594,'6ed63ff56baf042bb15063060b66e8e7a155472f','audio/ogg; charset=binary','setgid Ogg data, Opus audio,'), (3965,'hpr3965.flac','flac',27978369,'0d865cea86928c32949a105ef916c550e41d3454','audio/flac; charset=binary','setgid FLAC audio bitstream data, 16 bit, mono, 192 kHz, 70246509 samples'), (3965,'hpr3965.spx','spx',1382435,'45d5fc65e698aaffc945ce164a251c11f883c8e1','audio/ogg; charset=binary','setgid Ogg data, Speex audio'), (3965,'hpr3965.ogg','ogg',3113281,'865525178c607e1a04c1103e7ec30b36e041c1c6','audio/ogg; charset=binary','setgid Ogg data, Opus audio,'), (3965,'hpr3965.mp3','mp3',2928924,'31dcef4579506c834f79b16093db081c18486d8b','audio/mpeg; charset=binary','setgid Audio file with ID3 version 2.4.0, contains:MPEG ADTS, layer III, v1, 64 kbps, 48 kHz, Monaural'), -(3955,'hpr3955.wav','wav',167893632,'278f094549c182c532fd31a6b86c9fc0e1c5e7dc','audio/x-wav; charset=binary','setgid RIFF (little-endian) data, WAVE audio, mono 192000 Hz'), -(3955,'hpr3955.opus','opus',3729184,'1d67cd8e0daf6c33813b4f788645557024c2c6c4','audio/ogg; charset=binary','setgid Ogg data, Opus audio,'), +(3955,'hpr3955.wav','wav',167893632,'278f094549c182c532fd31a6b86c9fc0e1c5e7dc','audio/x-wav; charset=binary','setgid RIFF (little-endian) data, WAVE audio, mono 192000 Hz'); +INSERT INTO `assets` (`episode_id`, `filename`, `extension`, `size`, `sha1sum`, `mime_type`, `file_type`) VALUES (3955,'hpr3955.opus','opus',3729184,'1d67cd8e0daf6c33813b4f788645557024c2c6c4','audio/ogg; charset=binary','setgid Ogg data, Opus audio,'), (3955,'hpr3955.flac','flac',33421403,'ad74420301eea9f3a06b718a6f8b664ac99d3047','audio/flac; charset=binary','setgid FLAC audio bitstream data, 16 bit, mono, 192 kHz, 83946097 samples'), (3955,'hpr3955.ogg','ogg',3728893,'a2b62b87eb082c7729d27e3ea55f464cec5f5fc2','audio/ogg; charset=binary','setgid Ogg data, Opus audio,'), (3955,'hpr3955.spx','spx',1651882,'2e9738c4b124c6b399db0545f12a8997e320682f','audio/ogg; charset=binary','setgid Ogg data, Speex audio'), @@ -11836,8 +11860,8 @@ INSERT INTO `assets` (`episode_id`, `filename`, `extension`, `size`, `sha1sum`, (3924,'hpr3924.spx','spx',6156609,'48d3503e61427c80d67280ac3ab921b2357b9973','audio/ogg; charset=binary','setgid Ogg data, Speex audio'), (3924,'hpr3924.ogg','ogg',15448992,'5645a70c5fb9da20045cc21d1066acc7ce42ac24','audio/ogg; charset=binary','setgid Ogg data, Opus audio,'), (3924,'hpr3924.mp3','mp3',13040959,'43ebcaf9dccbe35e7dded09d910d4a507d6c1446','audio/mpeg; charset=binary','setgid Audio file with ID3 version 2.4.0, contains:MPEG ADTS, layer III, v1, 64 kbps, 48 kHz, Monaural'), -(3925,'hpr3925.wav','wav',157368976,'7e217213bc25d8deae0286ed58df0770170c445c','audio/x-wav; charset=binary','setgid RIFF (little-endian) data, WAVE audio, mono 192000 Hz'); -INSERT INTO `assets` (`episode_id`, `filename`, `extension`, `size`, `sha1sum`, `mime_type`, `file_type`) VALUES (3925,'hpr3925.opus','opus',3476516,'2de914b192e1fabce55341f9a79590c30bccc730','audio/ogg; charset=binary','setgid Ogg data, Opus audio,'), +(3925,'hpr3925.wav','wav',157368976,'7e217213bc25d8deae0286ed58df0770170c445c','audio/x-wav; charset=binary','setgid RIFF (little-endian) data, WAVE audio, mono 192000 Hz'), +(3925,'hpr3925.opus','opus',3476516,'2de914b192e1fabce55341f9a79590c30bccc730','audio/ogg; charset=binary','setgid Ogg data, Opus audio,'), (3925,'hpr3925.flac','flac',33949813,'ab0cc96014d31695d3163837499622206e4f5fd4','audio/flac; charset=binary','setgid FLAC audio bitstream data, 16 bit, mono, 192 kHz, 78683760 samples'), (3925,'hpr3925.spx','spx',1548394,'302f9ceb3ef1c69a0d47da67bbfb8e9e1e299435','audio/ogg; charset=binary','setgid Ogg data, Speex audio'), (3925,'hpr3925.ogg','ogg',3476207,'74cc595f84fe67b3203474a12426e381553a517c','audio/ogg; charset=binary','setgid Ogg data, Opus audio,'), @@ -12310,7 +12334,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=3791 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='New comments table populated from c5t_* tables'; +) ENGINE=MyISAM AUTO_INCREMENT=3792 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='New comments table populated from c5t_* tables'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -16104,7 +16128,8 @@ INSERT INTO `comments` (`id`, `eps_id`, `comment_timestamp`, `comment_author_nam (3786,3916,'2023-08-07 19:53:33','dnt','grandfather clock','had a great laugh at Ken\'s description of the proper environment in which to enjoy one of spoons\' shows.','2023-08-07 19:55:57'), (3787,3856,'2023-08-08 06:37:27','tuturto','great show','I loved listening you explaining about painting toy soldiers. I wanted to add, that if time needed to paint a 28mm figurine is too long, one can always try switching to a different scale. I especially enjoyed 10mm ancients, because they\'re faster to paint and look quite nice from the arms length.','2023-08-08 14:14:59'), (3788,3840,'2023-08-08 06:57:58','tuturto','this brings back memories','I used to play civilization a lot and it\'s still a very awesome game. In my very first game, things went horribly wrong and when I finally got around having chariots, my neighbour just demolished them with their tanks. I clearly had been focusing on wrong things on that time.\r\n\r\nI\'m thinking that we should get our daughter to give it a try too and experience that \"one more turn\" behaviour.','2023-08-08 14:14:59'), -(3790,3919,'2023-08-10 15:41:59','one_of_spoons','Morphic resonance.','Some years ago I met someone who had been smoothing the staccato out from their voice. I noticed how some people yank their emphasis around, while others map layers of lilting meaning; almost musical but without singing. \r\nAlso I noticed how speaking a different language presented the opportunity to shake out some vocal habits.','2023-08-10 16:01:26'); +(3790,3919,'2023-08-10 15:41:59','one_of_spoons','Morphic resonance.','Some years ago I met someone who had been smoothing the staccato out from their voice. I noticed how some people yank their emphasis around, while others map layers of lilting meaning; almost musical but without singing. \r\nAlso I noticed how speaking a different language presented the opportunity to shake out some vocal habits.','2023-08-10 16:01:26'), +(3791,3919,'2023-08-12 12:26:52','tuturto','lilting','That is a good advice. Lilting, a voice that raises and falls, is often perceived more feminine than a steady one that doesn\'t change pitch that much. Another slightly related term is uptalk, where pitch raises slightly towards the end of sentence, making a statement sound more like a question. Uptalk is often perceived feminine, although it\'s not exclusively feminine trait.','2023-08-12 13:42:07'); /*!40000 ALTER TABLE `comments` ENABLE KEYS */; UNLOCK TABLES; /*!50003 SET @saved_cs_client = @@character_set_client */ ; @@ -19855,7 +19880,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 not Multics
\nMultics = Multiplexed Information and Computer Service
\nUNIX = Uniplexed Information and Computing Service
\nThe 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.
\nThis wiki helped me emulate UNIXv5.
\nAnd this one helped me emulate UNIXv7.
\nThese guys host ancient systems accessible via guest accounts over ssh.
\n\n\n\"Cool, but useless.\"
\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.
\nWhen 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.
\nA 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.
\nAlso, 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.
\nSo what is the philosophy?
\nAnd additionally:
\nUNIX 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.
\nIn 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.
\nAs 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
\nIn 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.
\nThe 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.
\nIn 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.\"
\nAbstracting 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.
\nNo 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.
\nWhen 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.
\nKernel 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.
\nA 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).
\nIn order to visualize this, I imagine a tree-like structure descending from the root directory, /
. The tree(1)
program shows this type of hierarchy.
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\".
\nAdditionally, using bind mounts, a directory can be mounted onto another directory as if it were just another filesystem.
\nThe 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.
\nWell, almost everything is presented as if it were a file. This greatly simplifies programming.
\nPrime 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.
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.
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
\nYet another example: the TTY is just a file. You can even print it to a text file using setterm(1)
on Linux.
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
\nYet 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.
\nOn UNIX, files are indexed by inodes (index nodes). Using links, we can make \"shortcuts\" to files.
\nHard 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\"
\nSymlinks 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.
\nUsing links, we can make files more convenient to access as if we are \"copying\" files without actually copying files.
\nOn 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.
\nExtensions 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\"
\nSee also: Multitasking.
\nExercise 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.
\nA 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).
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.
\nSince UNIX was designed to be a multiuser system, access control is required. We know about users, we know about groups, but what about permissions?
\nThere 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.
\nAll UNIX utilities worth using use 3 data streams:
\nThe 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.
\nExplicitly 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.
\nThe 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.
\nProblem 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.
\nPipes, 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.
All standard command line utilities are interoperable and can be easily attached like building blocks. \"Meta programming\" has never been easier.
\nPipes make it so that every UNIX program is essentially a filter. Sure, you could just use awk, but I prefer shell.
\nUNIX 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.
\nThis script was trimmed to serve as an example.
The three options shown (email, jop, dots) demonstrates, how to list items with case statements:
\nThe text files created after the archive serves as an item list
\nwith current permissions.
tar --directory= /path/to/directory/ --create --file INSERT_ARCHIVE_NAME.tar /path/to/file;
#!/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
\ntar --extract --directory= /path/to/directory/ --file /path/to/file;
cp -v -t /path/to/directory *08-05-2022.tar.gz;
command is used totar --extract
example to keep things short and sweet.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.
\nFCC Caller ID Spoofing info: Spoofing is when a caller deliberately falsifies the information transmitted to your caller ID display to disguise their identity.
\nFCC 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.
\nThe PinePhone Pro Explorer Edition is aimed at Linux developers with an extensive knowledge of embedded systems and/or experience with mobile Linux.
\nTime-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.
\nMatrix is an open standard for interoperable, decentralised, real-time communication over IP.
\nPassword Managers: Used by Some Guy On The Internet.
\nBitwarden
\nKeePassXC
\nThere were no new hosts this month.\n
\n\nNote 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 5 comments in total.
\nThere are 3 comments on\n3 previous shows:
\nUpdated on 2023-08-10 23:18:26
\nThere are 2 comments on 2 of this month\'s shows:
\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
\nThe threaded discussions this month can be found here:
\nhttps://lists.hackerpublicradio.com/pipermail/hpr/2023-August/thread.html\n\n\nWith the kind permission of LWN.net we are linking to\nThe LWN.net Community Calendar.
\nQuoting the site:
\nThis 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
\nThere were no new hosts this month.\n
\n\nNote 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 6 comments in total.
\nThere are 3 comments on\n3 previous shows:
\nUpdated on 2023-08-13 23:23:06
\nThere are 3 comments on 2 of this month\'s shows:
\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
\nThe threaded discussions this month can be found here:
\nhttps://lists.hackerpublicradio.com/pipermail/hpr/2023-August/thread.html\n\n\nWith the kind permission of LWN.net we are linking to\nThe LWN.net Community Calendar.
\nQuoting the site:
\nThis 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
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.
\nTry This One Weird Trick Russian Hackers Hate
\nhttps://krebsonsecurity.com/2021/05/try-this-one-weird-trick-russian-hackers-hate/
Fake VM Sandbox artifacts - not talked about in this episode
\nhttps://github.com/NavyTitanium/Fake-Sandbox-Artifacts
Has your password been involved in a breach?
\nhttps://haveibeenpwned.com/
Realtime Global Cyber Attack Map
\nhttps://threatmap.checkpoint.com/
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.
\nI have a lot of smaller PC\'s running as servers at home but now I\nfinally bought my first server chassis to install a real server in my\nrack. I ran into a lot of complications and that\'s covered in this\nepisode.
\n',382,0,0,'CC-BY-SA','server, hardware, rack',0,0,1), (3945,'2023-09-15','My chrome plugins',271,'Daniel Persson summarize the essential plugins he uses every day','We all use plugins in order to facilitate our work this is my\nfavorite picks.
\n',382,0,0,'CC-BY-SA','chrome, plugins',0,0,1), (3955,'2023-09-29','airgradient measurement station',356,'Daniel Persson talks about a hardware measurement station he\'s installed','AirGradient is an open-source solution to measure the air in your\nliving area. In my case, I need to keep track of the air in my office,\nso I have a healthy working environment.
\n',382,0,0,'CC-BY-SA','airgradient, measurement, air quality',0,0,1), -(3965,'2023-10-13','I\'ve taken the Conqueror Virtual Challenge',285,'Daniel Persson talks about a service where you challenge yourself for better health','This service will help you keep track of your walks and incentivize\nyou to walk more and stay healthy.
\n',382,0,0,'CC-BY-SA','challenge, walk',0,0,1); +(3965,'2023-10-13','I\'ve taken the Conqueror Virtual Challenge',285,'Daniel Persson talks about a service where you challenge yourself for better health','This service will help you keep track of your walks and incentivize\nyou to walk more and stay healthy.
\n',382,0,0,'CC-BY-SA','challenge, walk',0,0,1), +(3934,'2023-08-31','Crusader Kings II',2292,'tuturto rambles about her all time favourite strategy game Crusader Kings II','Crusader Kings II is a dynasty simulator, where your goal is to guide\nyour dynasty through the middle ages. It\'s very large game and this\nepisode can only scratch the surface.
\nYou\'re a ruler of some kind, like count, duchess, king or empress to\nname a few. You need to manage vassals in your realm and keep your\nneighbours at bay. When you\'re not busy with that, you can relax and go\nhunting, build an observatory or join a secret society (to name just a\nfew).
\nCouple first games will be overwhelming, but it\'ll get easier when\nyou start realizing how things affect to each other and what kinds of\nthings you can do.
\nIf you\'re interested to learn more, have a look at the wiki: https://ck2.paradoxwikis.com/Crusader_Kings_II_Wiki
\n',364,122,0,'CC-BY-SA','Crusader Kings, Paradox',0,0,1), +(3942,'2023-09-12','RE: How to make friends.',763,'Sgoti replies to Klaatu\'s show, \"How to make friends.\"','Source: hpr3904 ::\nHow to make friends
\n
Source: Friendship
\n
Source: Interpersonal\nrelationship
\n
Source: Affection
\n
Source: Staples.com\ndiscbound notebook search
\n
Supporting Source: Staples\narc customizable notebook, 6.3/4in x 8.3/4in, 60 sheets, narrow ruled,\nblack
\n
Source: Happy Planner.
\n
Source: JoAnn
\n
Source: Transparent\nnotes, 36 sheets/pad, 1 pad/pack $5.19.
\n
Source: 6\npack discbound pocket letter size envelope organizer
\n
This work is licensed under a Creative Commons\nAttribution-ShareAlike 4.0 International License.
\n',391,0,0,'CC-BY-SA','Discbound, Notebooks, Planners, Happy Planner, Ink Pens.',0,0,1), +(3957,'2023-10-03','The Oh No! News.',2201,'Sgoti talks about investment and recovery scams.','Source: Avoiding and Reporting\nScams.
\n
Supporting Source: Refund\nand Recovery Scams.
\n
Supporting Source: Investment\nopportunity scams.
\n
Source: Reddit Community:\nr/Scams
\n
\r\nLurking Prion (He/Him/His) is a cybersecurity enthusiast, evangelist, mentor, and professional with 20+ years experience in the Healthcare, Financial, Telecommunications, Managed Security Services Provider (MSSP), Hybrid Cloud Service Provider (CSP), and other unspecified business sectors...\r\n
\r\n\r\nBeginning as a network administrator, Lurking Prion\'s career followed security as it progressed throughout the years in roles including:\r\n
\r\nLurking Prion also has a passion for teaching. It is his mission to help build a new generation of cyber security professionals with a security mindset.\r\n
\r\n\r\nLurking Prion may occasionally refer to himself as Robert.
\r\nLurking Prion likes coffee, dark beer, and dirty martinis.
\r\nLurking Prion only refers to himself in the third person when there is a lack of coffee or an abundance of stupidity.
\r\nLurking Prion\'s eye starts to twitch when all hell is about to break loose.
\r\nLurking Prion\'s spirit animal is DeadPool.\r\n
\r\nI love programming languages and their implementations, and I especially love exploring new paradigms of writing programs. I\'m online at https://davidchristiansen.dk.\r\n
','CC-BY',0,'',1,'David Thrane Christiansen'), (419,'Ryuno-Ki','andre.jaenisch.nospam@nospam.posteo.de','Web-Developer and Consultant as a freelancer since 2023.\r\n\r\nHomepage: https://jaenis.ch/\r\nProfessional email: andre.jaenisch.wdc@posteo.net','CC-BY-SA',0,'',1,'Ryuno-Ki'); @@ -21034,4 +21063,4 @@ UNLOCK TABLES; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2023-08-11 6:02:22 +-- Dump completed on 2023-08-14 7:15:24