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...
Linux Tools
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...
glabels-3-batch on Fedora 25 segfault
The default glabels-3.4.x install on Fedora 25 through 29 segfaults when using the glabels-3-batch command. The following command fails: glabels-3-batch -o output.pdf -i crossdock-data.csv 150x200-crossdock-labels.glabels I found compiling from source with defaults...
The End of Ye Olde Ugly NGinx Config Files
Install python3. This is for CentOS Download and install nginxfmt.py. The download and the instructions are at https://github.com/1connect/nginx-config-formatter Once installed usage is as follows. [code...
When outbound HTTP and HTTPS is denied you have to get creative with 3proxy and SSH
https://www.digitalocean.com/community/tutorials/how-to-route-web-traffic-securely-without-a-vpn-using-a-socks-tunnel The above link has a how-to on running a socks5 proxy just by using ssh. PS I have used Digital Ocean for 3+ years and except for one instance of...
SeLinux Apache Joomla — No network connect for you!
If you have Apache+PHP+Joomla and are trying to use the Joomla Update feature while seLinux is enabled you will probably see But you can get it to work if you set the correct option in seLinux ...
Windows 7-Zip Chunks, Linux Un-chunk My Heart
Chunking Files with 7-Zip on Windows From windows you can do the whole shebang directions here ==> http://www.techulator.com/resources/6601-How-split-join-files-using-7-zip-free-tool.aspx This is my directions for chunking something on windows and then...
Notes from PHP 5.x to PHP 7.1 Upgrade
PHP Install on Mac I use CakePHP 2 and 3 so they need intl and mcrypt brew install php71 --with-httpd24 brew install php71-imagick brew install php71-intl brew install php71-mcrypt Also I found that calling a function as follows fails # this PHP 5.x code calls a...
nginx suddenly can’t proxy to non-standard ports – Boolean SeLinux
I did an upgrade recently and suddenly nginx wasn't forwarding requests to remote hosts on non-standard ports.... this was on a CentOS host which had seLinux enabled. Turn seLinux off temporarily setenforce 0 Does nginx now work proxying to non-standard ports? Turn it...
Booklet Printing in Linux
The Dream I want to create a booklet from a PDF file, like so: I've been having trouble when I try to print Booklet format under Linux so I thought I would try to capture the settings I used in a blog post. Configure for Booklet in Adobe Reader & Print to...