Hacker Public Radio Hacker Public Radio
-
- Technology
-
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.
-
HPR4104: Introduction to jq - part 1
Introduction
This is the start of a short series about the JSON data format, and how
the command-line tool jq
can be used to process such data. The plan is to make an open series to
which others may contribute their own experiences using this tool.
The jq command is described on the GitHub page as follows:
jq is a lightweight and flexible command-line JSON processor
…and as:
jq is like sed for JSON data - you can use
it to slice and filter and map and transform structured data with the
same ease that sed, awk, grep and
friends let you play with text.
The jq tool is controlled by a programming language
(also referred to as jq), which is very powerful. This
series will mainly deal with this.
JSON (JavaScript Object
Notation)
To begin we will look at JSON itself. It is defined on
the Wikipedia page
thus:
JSON is an open standard file format and data
interchange format that uses human-readable text to store and transmit
data objects consisting of attribute–value pairs and arrays (or other
serializable values). It is a common data format with diverse uses in
electronic data interchange, including that of web applications with
servers.
The syntax of JSON is defined by RFC 8259 and by
ECMA-404.
It is fairly simple in principle but has some complexity.
JSON’s basic data types are (edited from the Wikipedia page):
Number: a signed decimal number that may contain a
fractional part and may use exponential E notation, but cannot include
non-numbers. (NOTE: Unlike what I said in the audio,
there are two values representing non-numbers: 'nan' and
infinity: 'infinity'.
String: a sequence of zero or more Unicode characters.
Strings are delimited with double quotation marks and support a
backslash escaping syntax.
Boolean: either of the values true or
false
Array: an ordered list of zero or more elements, each of
which may be of any type. Arrays use square bracket notation with
comma-separated elements.
Object: a collection of name–value pairs where the names
(also called keys) are strings. Objects are delimited with curly
brackets and use commas to separate each pair, while within each pair
the colon ':' character separates the key or name from its
value.
null: an empty value, using the word
null
Examples
These are the basic data types listed above (same order):
42
"HPR"
true
["Hacker","Public","Radio"]
{ "firstname": "John", "lastname": "Doe" }
null
jq
From the Wikipedia page:
jq was created by Stephen Dolan, and released in October
2012. It was described as being “like sed for JSON data”. Support for
regular expressions was added in jq version 1.5.
Obtaining jq
This tool is available in most of the Linux repositories. For
example, on Debian and Debian-based releases you can install it
with: -
HPR4103: What's in my bag?
Laptop:
Estarer
Messenger Resistant Briefcase Computer Grey
Power bank
INIU
High Speed Flashlight Powerbank Compatible -
HPR4102: Re:HPR 3133 More MPV Quick Tips
MPV resources
Awesome mpv resources on
Github
MPV folder history on
Github
My github
MPV History using Lua on
my Github page
hpr3133 ::
Quick tip - Using MPV with Youtube links
I give a quick tip on shortcut keys for watching Youtube or other
video sites in MPV
hpr3133 :: Quick tip - Using
MPV
My MPV History excerpt
My MPV History excerpt -
HPR4101: A I O M G
https://docs.google.com/document/d/17z3i5VlRzEn2tYPfb-Cx0LYpdKkbL-6svIzp7ZQOvX8
Resume Update Tips
I use Kagi.com pro $300 / year but you get access to much more
Search+AI but not plugins like ChatGPT so if you MUST have ChatGPT
plugins you will need OpenAI Premium account but if you don't I high
recommend Kagi.com Pro account with access to Assistant Beta !!!
Land a Job using ChatGPT: The Definitive Guide!
https://youtu.be/pmnY5V16GSE?t=192
Extensive Resume Notes
https://drive.google.com/file/d/1zeYIG7tTE0BUqbRM7-hpk3VdTRc35ZkL/view?usp=sharing
Ripped cybersn
https://rmccurdy.com/.scripts/downloaded/knowmore.cybersn.com_20220811.txt
Perfect ChatGPT Prompt
https://www.youtube.com/watch?v=jC4v5AS4RIM
Summary
There is a formula consisting of 6 building blocks that can help
generate high quality outputs from ChatGPT and Google Bard: task,
context, exemplars, persona, format, and tone.
The order of importance for the building blocks is task first, then
context, with the others being optional but helpful.
The task should clearly articulate the end goal using an action verb
like "generate" or "analyze".
Context provides relevant background information to constrain
possibilities.
Exemplars like examples or frameworks included in the prompt can
improve output quality.
The persona allows specifying who ChatGPT should be, like a job
recruiter.
The format specifies how the output should be structured, like an
email or bullet points. Tone provides keywords to set the feeling, like
"friendly" or "serious".
Example
You are a senior product marketing manager at Apple and you have just
unveiled the latest Apple product in collaboration with Tesla, the Apple
Car, and received 12,000 pre-orders, which is 200% higher than target.
Write an email to your boss, Tim Cookie, sharing this positive news. The
email should include a tl;dr (too long, didn't read) section,
project background (why this product came into existence), business
results section (quantifiable business metrics), and end with a section
thanking the product and engineering teams. Use clear and concise
language and write in a confident yet friendly tone.
Example 2 ( mine )
I want you to act as a cyber security specialist for a leading
consumer products company and you want to relay the importance of people
understanding their data and have some idea what they want to do with it
before we spend hours for the onboarding effort. Write an email to your
boss, Joey , sharing this critical component of the SIEM. The email
should include a tl;dr (too long, didn't read) section, example
of how the team can spend many cycles onboarding data only to find the
requester has no idea what they want to do with the data or it does not
satisfy their use case. Use clear and concise language and write in a
confident yet friendly tone.
Response Subject: Streamlining SIEM Onboarding with
Clear Data Objectives
Hi Joey,
I hope this email finds you well. I wanted to touch base on a
critical aspect of our Security Information and Event Management (SIEM)
process that could significantly enhance our efficiency.
TL;DR: We need to ensure that stakeholders understand their data and
have clear objectives before we initiate the SIEM onboarding -
HPR4100: Charleston, South Carolina
Charleston, South Carolina is a classic Southern city which had a
past as a wealthy city, in large part due to slavery, and was active in
the American Revolution before becoming the starting place of the Civil
War.
Links
https://flic.kr/s/aHBqjAvQKR
https://flic.kr/s/aHBqjAvQY6
https://flic.kr/s/aHBqjAvS82
https://www.palain.com/travel/rv-trip-2022-2023-southeast-us/charleston-south-carolina/ -
HPR4099: Introducing Home Automation and Home Assistant
Home Automation, The
Internet of things.
This is the first episode in a new series called
Home
Automation. The series is open to anyone and I encourage everyone to
contribute.
https://en.wikipedia.org/wiki/Home_automation From
Wikipedia, the free encyclopedia
Home automation or domotics is building automation for a home. A home
automation system will monitor and/or control home attributes such as
lighting, climate, entertainment systems, and appliances. It may also
include home security such as access control and alarm systems.
The phrase smart home refers to home automation devices that have
internet access. Home automation, a broader category, includes any
device that can be monitored or controlled via wireless radio signals,
not just those having internet access. When connected with the Internet,
home sensors and activation devices are an important constituent of the
Internet of Things ("IoT").
A home automation system typically connects controlled devices to a
central smart home hub (sometimes called a "gateway"). The user
interface for control of the system uses either wall-mounted terminals,
tablet or desktop computers, a mobile phone application, or a Web
interface that may also be accessible off-site through the Internet.
Now is the time
I tried this out a few years ago, but after a lot of frustration with
configuration of esp32 arduinos, and raspberry pi's I left it be.
Recently inspired by colleagues in work, I decided to get back into it
and my initial tests show that the scene has much improved over the
years.
Youtube Playlist
The
Hook Up,
RSS
Home
Automation Guy,
RSS
Everything
Smart Home,
RSS
Smart
Solutions for Home,
RSS
Smart
Home Circle,
RSS
Smart
Home Junkie,
RSS
Home Assistant
The first thing we'll need is something to control it all. Something
will allow us to control our homes without requiring the cloud.
https://en.wikipedia.org/wiki/Home_Assistant From
Wikipedia, the free encyclopedia
Home Assistant is free and open-source software for home automation,
designed to be an Internet of things (IoT) ecosystem-independent
integration platform and central control system for smart home devices,
with a focus on local control and privacy. It can be accessed through a
web-based user interface, by using companion apps for Android and iOS,
or by voice commands via a supported virtual assistant, such as Google
Assistant or Amazon Alexa, and their own "Assist" (built-in local voice
assistant).
The Home Assistant software application is installed as a computer
appliance. After installation, it wil