All of the applications and utilities of this repository consists of just a single file.
This readme is (supposedly) the one too many (and that’s good).
Each of these files includes their own License/Copyright information.
Full-terminal interactive chdir utility; navigate through directories using arrow keys and filtering text. Simple four-liner is to be added to shell rc files for this to be effective (listed in the beginning of the file, just after BSD-2-Clause SPDX license idenfifier line).
Create zip archives reproducible (and with minimal metadata). All files in archive will have the same date and time, and when recursing into directories the filenames are sorted (in order of the byte strings that make up those filenames).
Mount filesystem from remote system like sshfs but data connection for transferring filesystem content between hosts is unencrypted.
In addition to "normal" mount also "reverse" mount is avaible; i.e. local filesystem is mounted to remote host.
Sshlessfs uses ssh to create connection between hosts and when that is created it launches sshfs(1) to the host where filesystem is to be mounted and sftp-server(8) to the host which provides the filesystem.
Uses gdb(1) to (attempt to) redirect fds 1 (stdout) and 2 (stderr) of a process ({pid}) to a file if all three, 1 (stdin), 2 and 3 are pointing to the same file.
With this requirement (all three same) the script provides option to restore all three to same (by using gdb to dub fd 0 (back) to fd 1 and fd2.
Convenient podman run wrapper. First of all, prefixes --pull=never --rm -it
to the podman run command line options. Mounts current directory
(and/or $HOME) into the container and sets current dir as workdir. poru(1)
provides quite a few helper commands when container image (or more run
options) are not given as first arguments.
Synchronize local directory tree to one or more remote directories and keeps updating further changes to remotes.
Linux inotify(7) is used to recognize changes in the local file system
Simplest usage command line is nowsync.pl . remotehost:remotedir
which copies local current directory (tree) to remotedir at remotehost.
Interactive local client to communicate with remote part of the same program.
Directory listing, file copying, to name a few - with command line completion.
Offer fixed IP address to any DHCP client making a request. Very useful for e.g. to bootstrap initial device connections or doing development through "point-to-point" ethernet cable between 2 computers.
Uses tcpdump(8) to bypass firewall for reading DHCP traffic.
|
Note
|
this was done due to |
Very simple serial port communication program. Sets bit rate 115200, 8N1, and without hardware flow control. This setup works usually out of the box.
Takes serial device (e.g. /dev/ttyUSB0) and optional log file as an arguments.
Send SIGTERM to exit simplecom. SIGUSR1 to re-open (possibly new) log file.
Simplecom is written in C. Compile it by entering sh src/simplecom.c
Convert "text pixmap" file to xpm image(s). Text pixmap format is very easy to type using text editor — easier than editing xpm files. It automatically calculates widht and height and catches editing errors before one tries to view the final image.
Remap colors of an xpm file and write a bmp file. The use case here is partial transparencies due to 8-bit alpha channel available.
Convert 2-color xpm file to utf8 text of braille characters. One braille character in 0x2800-0x29ff range presents 2x4 pixels of the xpm image.
Manage versions of a file in a {filename},sfv file. The file format for
,sfv file is ar(5) and the original file is never modified by this tool.
ipv6llchat.pl (prototype)
Send short messages to the people near you on their computers connected to the same local area network. These computers does not need to have any other than (required) ipv6 link local address configured (i.e. communication is possible even when getting ip address fails for some reason).
Listens (currently) connections from localhost:8080, expects HTTP CONNECT reguest, and if the request can be fulfilled forwards data bidirectionally between endpoints (see also: https://en.wikipedia.org/wiki/HTTP_tunnel).
Wraps mkdir(2) and mkdirat(2) system calls, replaces mode with 0777 always. Useful in cases where there is need to give everyone read/write access to directories, and the commands creating those dirs don’t have option for that.
This used to be in developer tools section, but since so many diff
related tools it perhaps is clearer to have their own section.
Run emacs and (ediff-buffers) the two (2) files given on command line.
Starts as shell script, re-executes itself as emacs lisp file.
Binary Dump-Hex Diff.
Works by converting bytes in binary files to hexadecimal numbers one
byte per line and then running diff(1) for the content. The output of
the diff command is then colored and converted to hexdump -C style
printout.
This may prove useful. Note that diffing large files (like hundreds of kilobytes) is not instantaneous (and diff(1) execution time may be in the magnitude of 200s when diffing two 16MiB files).
Create a tunnel from one host to another, then on this another host,
execute tdiff.pl file1 file1 and do the diffing on this first host.
The tdiff.pl must be available on both hosts; the same program is
used for both tunnel endpoints and as the diff tool to feed data
through it to the diff program.
Sample creation of a tunnel
$ ./tdiff.pl . xxdiff ssh 127.0.0.1 $PWD/tdiff.pl
Then on another terminal
$ git cat-file -p HEAD^:README.adoc | ./tdiff.pl - README.adoc
In the example, xxdiff is used to show diffs…
Create side-by-side html 5 document from unified diff source.
Example run
$ git show 5d00a0440 | ./uni2htmldiff.py -o difftest.html 88 - $ echo file://$PWD/difftest.html
and give the resulting file:// url to web browser for further inspection.
Print side-by-side (lossy) hex-ascii dump of 2 files, 2 "lines" (32 bytes) of context. If in-context difference is large, shows (only) 4 "lines" (64 bytes) of differing data from beginning and end of context.
"One line" of C code given from command line compiled in main() and
then executed (by default). Useful for quickly testing simple things.
Given a C type as argument, attempts to match it with several integer and floating point types using (gcc) __builtin_types_compatible_p() to match. Prints out signedness, size and match if found, of a type.
Sample code to do getopt_long(3) style argument parsing. Code to be
included (partially verbatim, rest editable) within a C program source.
The last 100 lines of code in this "Unlicense"d file shows comprehensive
example of the features in this (extendable) implementation.
Share git repositories (and files) among friendly and polite users.
This provides somewhat more features than git-shell(1) but less than e.g. gitolite (git-wise).
For filesystem access one(tm), in addition to simple scp, can activate sftp-server (for sftp/sshfs!) feature (by removing some comments)…
Not much effort has been done to ensure safety from malicious intent, but some protection against accidental damage from friendly and polite people has been implemented.