10 Folgen

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

Hacker Public Radio Hacker Public Radio

    • Technologie

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

    HPR3017: Developing Black and White Film

    HPR3017: Developing Black and White Film

    My photos will be available at: https://pquirk.com

    HPR3016: Nixie tube clock and friends!

    HPR3016: Nixie tube clock and friends!

    Nixie tube (English: /ˈnɪk. siː/ NIK-see), or cold cathode display, is an electronic device for displaying numerals or other information using glow discharge.
    http://www.tindie.com/products/robg/msp430-nixie-clock-kit/

    HPR3015: ActivityPub Conference 2019 - The Semantic Social Network

    HPR3015: ActivityPub Conference 2019 - The Semantic Social Network

    The ActivityPub Conference of 2019 was held in Prague. This is about a talk using ActivityPub to create the Semantic Social Network. https://www.zwilnik.com/?page_id=1086
    Links:

    https://redaktor.me/apconf/
    https://archive.org/details/apconf-talks/Talk3_Pukkamustard_compressed.mov
    http://schema.org/
    https://schema.org/servesCuisine
    https://schema.org/areaServed
    https://5stardata.info/en/
    https://moz.com/blog/json-ld-for-beginners
    https://en.wikipedia.org/wiki/Fediverse
    https://www.zwilnik.com/?page_id=1086

    HPR3014: A Headless Raspberry Pi Streaming Radio

    HPR3014: A Headless Raspberry Pi Streaming Radio

    In this episode I talk about how I used a Raspberry Pi to create a streaming radio device to feed my pillow speaker. This is something I used to do with clock radios and later a satellite radio, but in an effort to decrease monthly subscription costs for services I did not use optimally, I discontinued my satellite radio subscription about a year ago. This new free solution is an excellent substitute for Satellite Radio so far, since I was mostly listening to this same channel on the Sat Radio but paying about $12 a month for the privilege. The device I’m using is a Raspberry Pi 2 Model B with Ubuntu Server. My barrier to this project in the past was not being able to find the URL for the stream I wanted but I discovered you can find it easily if you use Firefox with Video Download Helper to reveal the URL on a page with media playing (in this case it’s from TuneIn):

    http://XX.XXX.XXX.XXX/radio-stationmp3-48?session-id=af1b271fefba04b650f8e253c6b253bd&source=TuneIn


    Strip off everything after the 48 to get raw URL:

    http://XX.XXX.XXX.XXX/radio-stationmp3-48


    Command to play stream with mpg123 on the Pi. Using the -q option to suppress output:

    mpg123-pulse -q http://XX.XXX.XXX.XXX/radio-stationmp3-48 &


    Once I figure out the command that plays the stream I want, I save the command as an executable script in /home/$user/bin.

    Using the “Radio”

    To start playing a stream you first have to SSH into the RasPi. This is easy from a laptop using any terminal emulator. I use pubkey auth so I don’t have to type a password every time. On my phone I use ConnectBot. Once I’m into the Pi I run the radio commands from CLI like espn or kmfa or krvs. To stop playback I kill the process with pkill mpg. I have a 3.5mm audio splitter Plugged into the headphone jack of the USB audio interface. In one side of the splitter I’ve got an old pair of earbuds where one side didn’t work, with the working earbud under my pillow. That’s my pillow speaker. On the other side of the splitter I put the audio cable for an FM transmitter, so that I can use an FM radio to listen to the stream while I’m walking around the house.

    Click the image below to see pictures of the setup.



    Links


    Raspberry Pi 2 Model B
    Ubuntu Server
    Video Download Helper (Firefox extension)
    The USB Audio interface I use
    Panda Wireless USB WiFi adapter
    mpg123 command-line audio player
    ConnectBot
    C. Crane FM Transmitter

    HPR3013: Bash Tips - 21

    HPR3013: Bash Tips - 21

    The Environment (More collateral Bash tips)
    Overview
    You will probably have seen references to The Environment in various contexts relating to shells, shell scripts, scripts in other languages and compiled programs.
    In Unix and Unix-like operating systems an environment is maintained by the shell, and we will be looking at how Bash deals with this in this episode. When a script, program or subprocess is invoked it is given an array of strings called the environment. This is a list of name-value pairs, of the form name=value.
    Using the environment
    The environment is used to convey various pieces of information to the executing script or program. For example, two standard variables provided by the shell are 'HOME', which is set to the current user’s home directory and 'PWD, set to the current working directory. The shell user can set, change, remove and view environment variables for their own purposes as we will see in this episode. The Bash shell itself creates and in some cases manages environment variables.
    The environment contains global data which is passed down to subprocesses (child processes) by copying. However, it is not possible for a subprocess to pass information back to the superior (parent) process.
    Viewing the environment
    You can view the environment in a number of ways.

    From the command line the command printenv can do this (this is usually but not always a stand-alone command: it’s /usr/bin/printenv on my Debian system). We will look at this command later.
    The command env without any arguments does the same thing as printenv without arguments. This is actually a tool to run a program in a modified environment which we will look at later. The environment printing capability can be regarded as more of a bonus feature.
    Scripting languages like awk (as well as Python and Perl, to name just a few) can view and manipulate the environment.
    Compiled languages such as C can do this too of course.
    There are other commands that will show the environment, and we will look at some of these briefly.

    Changing variables in the environment
    The variables in the environment are not significantly different from the shell parameters we have seen throughout this Bash Tips series. The only difference is that they are marked for export to commands and sub-shells. You will often see variables (or parameters) in the environment referred to as environment variables. The Bash manual makes a distinction between ordinary parameters (variables) and environment variables, but many other sources are less precise about this in my experience.
    The standard variables in the environment have upper-case names (HOME, SHELL, PWD, etc), but there is no reason why a variable you create should not be in lower or mixed case. In fact, the Bash manual suggests that you should avoid using all upper-case names so as not to clash with Bash’s variables.
    Variables can be created and changed a number of ways.

    They can be set up at login time (globally or locally) through various standard configuration files. It is intended to look at this subject in an upcoming episode so we will leave discussing the subject until then.
    By preceding the command or script invocation with name=value expressions which will temporarily place these variables into the environment for the command
    Using the export

    HPR3012: Sample episode from Wikipediapodden

    HPR3012: Sample episode from Wikipediapodden

    Jan Ainali from the http://wikipediapodden.se/ podcast came over to the http://freeculturepodcasts.org/ booth at FOSDEM 2020.


    They do a Swedish Language Podcast about wikipedia et al, and of course we added them to the http://freeculturepodcasts.org/ site. While their main shows are in Swedish, they also have summaries that they do in English which can be found at http://wikipediapodden.se/tag/english/, (RSS Feed).

Top‑Podcasts in Technologie

Zuhörer haben auch Folgendes abonniert: