#tips

Replace Spotlight search with an extensible app

I don’t have any arguments against the Mac’s Spotlight search – it’s a very capable product. But when I came across Raycast (https://www.raycast.com/) with its plugin capabilities, coupled with the fact that its extensions are Open Source, I was sold. The free plan is more than sufficient for me and the clipboard history extension has allowed me to get rid of a single purpose app I was using. Manual at https://raycastapp.notion.site/Raycast-Manual-d5c85a7694dc4e4088b8b93557ea6d2d

Replace Spotlight search with an extensible app Read More »

3 new (to me) linux (mac, android,windows) tools

I’ll cut right to the chase, Copyq, syncthing, and tldr.

Copyq, at https://hluk.github.io/CopyQ/, is a clipboard manager for Linux, Windows, MacOS, AND ChromeOS in the Linux environment! It has a GUI as well as a command-line interface and in the ChromeOS environment, captures clips from BOTH Linux and ChomeOS! CHeck out the docs.

Tldr, at https://github.com/tldr-pages/tldr, provides a cheat-sheet-like summary of command options. It’s not as full function as a man page but can often provide just that one bit of info you need. It provides info on Android, Linux, MacOS, Windows, Sun OS(!), and a set of common commands like 2to3 (convert python 2 code to python 3), adb (Android Debug Bridge which can be installed on many different platforms), and atom (a cross-platform editor).

Syncthing, at https://syncthing.net/, is an open source, multi-platform, authenticated, continuous file synchronization program with communications secured by TLS. It works on MacOS, Windows, Linux, Android among many others.

3 new (to me) linux (mac, android,windows) tools 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 »

Search engines

Everyone knows about Google search…so much so that it’s become a verb. Many know about some of the other search engines like DuckDuckGo.com and DogPile.com. But the search engine market is apparently not saturated because there are new ones entering all the time. One of my favorites is Neeva.com which promises not to track you, is free (including spaces which is kind of a persistent search) but offers additional features for a fee ($50/yr right now) but is perfectly serviceable on the free tier (and is my preferred search engine right now).

Another that I like to use occasionally is You.com. No ads like Neeva but You says they summarize the web based on your searches, providing answers from a limited list of sites they call your preferred sources, in different categories (e.g. web, news, shopping, etc). You can “thumbs up” or “thumbs down” sources but that’s about it. Still, its format and output can be useful.

A new one (to me) is AndiSearch.com – another that promises privacy It’s still in “alpha” status (which means they’re actively working on it and haven’t really finished the product) so it may break on occasion, They say they fight spam, won’t track you and won’t present you with ads. Its approach is a little different in that it’s conversational meaning that you interact with their “bot” and can type in queries as sentences. Sure, it has a command language so you can do things like “go facebook” and it’ll take you right to Facebook (although it’s beyond me why you would want to do that). The results are also presented differently from what I’m used to seeing – the bot takes up the left side of the window so the results are restricted to the right side of the window. You have some control over how the results are presented (mostly cosmetic) but overall I think it’s an interesting approach and one to keep an eye on. Do I use it much? Not right now but maybe, depending on how the product progresses…

Search engines Read More »

Free LISTSERV (email discussion) hosting

https://gaggle.email/ provides completels free email discussion hosting for up to 1000 members with moderation and a 3 month searchable archive. You can get additional features by purchasing either a 10 cent a month per user or a 15 cent a month per user subscription. But, honestly, I think I can get by with the free plan.

Free LISTSERV (email discussion) hosting Read More »

Turn any site into a PWA

I’m not sure how many of you are aware of or use Progressive Web Apps (or PWAs – look it up). Think of them as encapsulated web pages that appear as apps (because that’s what essentially they are) so, instead of bookmarking or trying to remember all those sites you can have an app for each of them that IS the website. The website creator has to do some work on their end to enable this functionality on their site and not everyone has done that. Enter https://surfable.app/ – an open source (github: https://github.com/sandoche/Surfable-app) tool that will create a PWA given the site’s URL. It’s pretty cool and has premade PWAs for many of the popular sites. And if you want to make a PWA for a site they don’t currently support (or you want to tweak one of their PWAs), their github explains how or you can justs open an issue about it. Useful and worthwhile IMHO

Turn any site into a PWA Read More »