Tech

Create your own cellular network

Ukama (https://www.ukama.com/) is using the Citizens Broadband Radio Service to let an unlicensed user create their own cellular network. Interesting idea! Read more at Ukama or in this article https://www.androidauthority.com/ukama-cell-service-3216235 or just drop in on their github (https://github.com/ukama/ukama/) and Twitter at https://twitter.com/ukamanetworks

Create your own cellular network Read More »

Google’s AI has achieved sentience? Nonsense!

This has been bouncing around the ether for a week or two now. I found it laughable then and still do. But I’m not an AI guy. Here’s the opinion of someone who is – Gary Marcus (https://en.wikipedia.org/wiki/Gary_Marcus). The TLDR? He calls bullsh*t. Read the article https://garymarcus.substack.com/p/nonsense-on-stilts?s=r.

Google’s AI has achieved sentience? Nonsense! Read More »

An SSH tunnel as a system service?

I came across this today and it’s an interesting idea! While I’m not sure I endorse creating and maintaining a tunnel, especially as root, I’m sure there are use cases where it makes sense. If nothing else, defining the config files and their contents to create a service is worth seeing. All the details, including how to make it run after reboot are at https://medium.com/linuxstories/linux-how-to-create-an-ssh-tunnel-as-a-systemd-service-73e6e0fff19b

An SSH tunnel as a system service? Read More »

More SSH? Yes, please!

My local server died a little over a week ago (more about that in a future post) so I bought a new mini PC (love those little things – got one with an 11th gen Intel Celeron, 16GB RAM and 512GB SSD for $280). In setting it up I opted to keep my VNC sessions local to the new machine accessing them via SSH tunnels. In researching various ways to establish and maintain the tunnel I came across https://gist.github.com/scy/6781836 and (re)learned quite a few things but the really interesting bits are in the comments! From the use of -M to establish a “master” mode for connection sharing and how to use it, to some basic scripts to make it easier to use, to autossh (https://www.harding.motd.ca/autossh/), to a nice little script called (in the comments) ssh-fp.sh. I’ve adapted and adopted several for my own use and I recommend the article!

More SSH? Yes, please! Read More »

Finally, a point-to-point VPN!

I’ve set up a VPN at home and, honestly, in my config, it’s a PAIN! I have 3 routers that need to have ports opened and then I need to make sure that certificates and passwords are all secure.

Then I found Tailscale.com! What a breath of fresh air. Why didn’t anyone think of this before? Create an account on tailscale.com then install the tailscale service on the machine you want to be a part of the VPN and run it. The service connects to the tailscale server and it becomes an immediately available VPN target, complete with its own hostname (which you can change) and its VPN IP address. If you enable their “MagicDNS” in your settings then the hostnames all resolve to their VPN IP addresses (i.e. the hostname is first checked against the hostnames on the VPN before being checked against other DNS resolvers). Voila! No config, no ports to open, no firewall rules to manage! Now, when you’re away from home, you can get to your home server with confidence.

It’s free for a single hobby/personal user. There are a few restrictions as to how many subnets you have available but, honestly, if you’re a home user, the restrictions probably won’t bother you. It’s multi-platform with binaries for Android, MacOS, iOS, Windows, and Linux so you can connect just about anything you want. They’re on github at https://github.com/tailscale and a place to discuss it at https://forum.tailscale.com/. And, yes, you can use tailscale to act as a subnet router – https://tailscale.com/kb/1019/subnets/ – to get to those devices (e.g. printers) on which you can’t install tailscale.

Apologies for the delay between postings but I prefer to try the things before I post about them and tailscale took a while.

Finally, a point-to-point VPN! Read More »

Web3 at a16z (and a bit of a16z’s structure)

An interview with a16z’s (Andreessen Horowitz) head of crypto investing, Chris Dixon. First, a bit on how a16z is structured (good info for anyone interested in startups and VC) then they get into a deep dive on web3, NFTs, and more in that space. I found it a fascinating and informative, if long, read. https://www.theverge.com/23020727/decoder-chris-dixon-web3-crypto-a16z-vc-silicon-valley-investing-podcast-interview

Web3 at a16z (and a bit of a16z’s structure) Read More »

COBOL for the masses!

That;s right – a free COBOL front-end to gcc so you can grab one of those lucrative mainframe COBOL programmer positions (I’m not kidding! Some companies are desperately looking for COBOL programmers to keep their systems running!) See the announcement at https://lwn.net/ml/gcc/20220314163437.54ed696e0499d0875743a0f3@schemamania.org/

COBOL for the masses! Read More »

Making my bash history more informative

I’m a long time bash user and have found that I really want more information in my bash history file … more than just the typical command number and command line. So, to my .bashrc I’ve added a time stamp, process id, and tty to the history output by setting HISTTIMEFORMAT like so

export HISTTIMEFORMAT="%F %T %Z %z $$ $TTY "

which produces something like

957 2022-03-02 10:37:05 PST -0800 684 /dev/pts/0 history | tail

As you can see, this adds, after the command number, the date as YYYY-MM-DD, the time with timezone and GMT offset, the process id and the tty on which it was entered. I also like to keep track of the commands that are entered when I’m in a certain directory (useful for git and, well, all sorts of things) so I add

export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ; }"'echo $TTY $$ $USER \
$PWD "$(history 1)" >> ~/.history/$(basename $PWD)'

This appends a history line to a directory in ~/.history which corresponds to the last component of the directory in which the command was entered. So, if my current working directory is ~/dev/git, commands are also appended to ~/.history/git along with the tty on which they were entered, the current process id, the current user and the full working directory which gives me something like

/dev/pts/1 1806 user /home/user/git 951 2022-03-02 10:47:00 PST -0800 1806 /dev/pts/1 ls -l ~/.history

Note, I don’t change HISTFILE so everything is still in one history file. And I use an alias to show history for the current directory

alias cathist='cat ~/.history/$(basename $PWD)'

And, while I’m at it, I enable host name completion with shopt -s hostcomplete and also ask bash to try to save a multiline command in one history entry with shopt -s cmdhist. And if I have lots of space, I allow my history file to grow as large as needed by setting (or unsetting) HISTFILESIZE and HISTSIZE. So I end up with the following lines added to my .bashrc

export HISTSIZE=
export HISTFILESIZE=
shopt -s histappend
shopt -s cmdhist
shopt -s hostcomplete

export HISTTIMEFORMAT="%F %T %Z %z $$ $TTY "
TTY=$(tty)

export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ; }"'echo $TTY $$ $USER \
$PWD "$(history 1)" >> ~/.history/$(basename $PWD)'

alias cathist='cat ~/.history/$(basename $PWD)

I picked this up from various sources and modified it to fit my needs. Feel free to use or hack as you see fit.

Making my bash history more informative Read More »

Crostini, the heart of Chrome OS

Chromebooks seem simple but under the hood there’s quite a bit of code that makes it all work. https://chromium.googlesource.com/chromiumos/docs/+/HEAD/crostini_developer_guide.md has an excellent fairly high level diagram of Chrome OS (CrOS). The Termina VM (right, Terminal without the trailing L) is where your “standard” Linux container (known as “penguin”) is started which gives you your full blown Debian environment. But note that at its very heart is a Debian container which starts up everything else. The reference above talks about how to MAKE CrOS.

If you want to learn more about how to USE CrOS and maybe launch your own containers instead of or in addition to penguin, read https://chromium.googlesource.com/chromiumos/docs/+/HEAD/containers_and_vms.md which talks about the mechanics of things

https://www.reddit.com/r/Crostini/comments/squfcz/trying_to_understand_what_chrome_oscrostini/ is the source article for this.

Crostini, the heart of Chrome OS Read More »