Posts

Rclone rcat and cat

Image
Good afternoon all, and just before we all enjoy a great weekend...

I know world backup day ( http://www.worldbackupday.com ) was two weekends ago, but I thought I would share this BRILLIANT little trick I found.

I hit the 400K file limit on my Backup Google Team Drive 2 weeks ago, which is a problem, to say the least.

Then I thought about it and figured that the worlds best cloud sync tool should have thought about this already, and someone has.

Turns out rclone has rcat into the cloud or cat from the cloud!

This means you can do something like:

tar -zcf - Backups/Folder/ | rclone rcat gdrive:/20190412.backup.tgz
and then to get it back:

rclone cat gdrive:/20190412.backup.tgz | tar -zxvf -
Enjoy!!!

Kubernetes in Docker on Mac

Image
brew link --overwrite kubernetes-cli kubectl config use-context docker-for-desktop kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/recommended/kubernetes-dashboard.yaml
vim dashboard-adminuser.yaml apiVersion: v1
kind: ServiceAccount
metadata:
name: admin-user
namespace: kube-system

kubectl apply -f dashboard-adminuser.yaml kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}')
Copy the token.

kubectl proxy
Open http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/


Tech Tip: Linux Virtual Router Redundancy Protocol Daemon and KeepAliveD

Image
I was asked a very good question today on how to make two Linux servers used as routers, failover on the same network.

I've done many implementations of ISP failover and cluster deployments, but this was the first time I've heard about VRRPD.


Virtual Router Redundancy Protocol Daemon is part of all the major Linux distributions and uses keepalived to monitor and react to failures.
Interesting solutions for server level services, but Docker Swarms takes care of service level services.
And it is supported by Mikrotik as well. ( https://wiki.mikrotik.com/wiki/Manual:Interface/VRRP )

MacOS OCR and translate in console

Image
Had received a purple envelope from Belastingdienst.nl with some important information of the 30%, so needed to get this into English.

Made for a good reason to figure this process out.


So it looks like Tesseract-OCR is the best Open Source OCR package I could find and the whole project is at https://github.com/tesseract-ocr/tesseract and it credits Google as the developer at https://en.wikipedia.org/wiki/Tesseract_(software)

For the translation we will use the Translate Shell, found at https://www.soimort.org/translate-shell/. This lovely little script supports a number of translation engines, so one of them should work for you.

1. Scan the letter.



Many options here, so not going to waste time on how to get this done. Just if you have a text option and go for 300DPI. We need TIFF on the other end, so if you can get TIFF, just do that.

2. Install the software

brew install tesseract brew install translate-shell
3. Run the software

tesseract input.tiff output trans -i output.txt

Ijshockey Nederland 2018/2019 Kalender

Image
All the games scheduled as they appear on the Ijshockey Nederland website.


MacOS Combine PDF's Documents

Image
Combining multiple PDF documents on MacOS is included with MacOS.

Turns out Apple included an Automator script for "Combine PDF Pages" with the OS and a Python script in the same folder.

So from terminal, you simply call the Python script and supply the output file (-o) with the input files.

/System/Library/Automator/Combine\ PDF\ Pages.action/Contents/Resources/join.py -o {output.pdf} {input1.pdf} {input2.pdf} {input3.pdf} {...}
A lot simpler and quicker than some other solutions.

Linux Unlimited Storage Folder using G Suite (Beta)

Image
Building a simple folder on your Linux server with unlimited cloud storage behind it. I will explain the basic concepts used and some guidelines on how to make it all work.

Basic concept

You will have /mnt/gdrivemount


And /mnt/gdrivewrite

And then UnionFS to combine the two into /mnt/gdriveunionfs/



Now, because Google Cloud Drive API limits the amount of requests per seconds, it is suggested that you add a cache into path to help limit these requests, so the /mnt/gdrivemount changes to


To be able to control what and when files are actually moved from your disk storage into the cloud storage, you will control the move to cloud process.