What I want to do: Print an A6 PDF centred on an A4 page from the command line on Linux What I tried: Tried to use evince and Firefox but they have no command line print options for linux. What worked: Calculate the margins and run lp or lpr by doing the following...
Selected posts
Run Shell Commands from the MySQL Client
Saw a post that says you need to put a ! to run a shell command in the MySQL but found in my mysql client that it was \! <shell-command-here> https://electrictoolbox.com/shell-commands-mysql-command-line-client/ To drop to a shell. use \! bash To return to the the...

PDF Poster
Start with a wide long image. This is just a screen shot of my desktop. widescreen.png Convert it to postscript using convert from ImageMagick # install ImageMagick sudo dnf install ImageMagick convert widescreen.png widescreen.ps Use poster to chop and format the...
Scribus to PDF Print
Just using Scribus to design and print some lapel cards Regarding Scribus - It seems that the stable version will not run or install easily on Fedora 32 so I have had to make do with the Scribus Version 1.5.6.svn Beta. So after getting around the flakey behavior of...
CUPS-PDF Printing Images not searchable PDF
I have a cups-pdf printer that takes the output from glabels-3-batch # Using glabels-3-batch results in a PDF you can select and copy the text from cat merge.csv | glabels-3-batch -i - -o out.pdf 100x50sample.glabels The PDF file which glabels-3-batch creates can be...
How to detach or disconnect a screen session on Linux
Crtl-a Ctrl-d
Advanced git
https://youtu.be/duqBHik7nRo Just putting this here for later. A git talk that covers everything that I wonder about with git. Also the speaker has a book which going by her previous courses will be excellent.
Use FORCE INDEX
Just putting this here as I have a SELECT in MySQL that was taking 1.946 sec to return 20 records from a table with 159884 records when using a ORDER BY DESC on a DATETIME field Creating an index and changing the FROM to FORCE INDEX () dropped it down to 0.00079 sec /...
Using a git repo as a composer repository
So here is the link so I don't forget it https://getcomposer.org/doc/05-repositories.md#vcs Add your repo's URL into your composer.json in the repositories key and change the version on the original repo name to your dev-* version where * is a branch of your github...
pgAdmin / pgcli could not send data to server: Socket is not connected
My setup is My home network is IPv6 enabled. I have an AAAA record specifying the IPv6 address of the Amazon EC2 instances Elastic IP <IPv6 enabled home network> | <internet> | <Dockerized Postgres on EC2 Instance> Getting this error message when attempting...