Because of personal reasons I had to reject to both domain names I used for my personal projects and So from November this years, will no longer be reachable.

But I’ll continue with the hosting for both projects as subdomains for the domain I use for my self since many years. So MDWiki will be reachable under and HowCanI will be hosted

I’ll continue both projects as my personal projects, since I used it for myself for some years. But
it’s still possible, to connect to your own GitHub repository.

Comment and share

To protect your USB-stick with a password you have to format it first with the Disk Utility program to the Mac OS Extended (Journaled) format with the GUI-Partitiontable.

Attention Please make a backup before you’re formatting it!!!

Then just go into the terminal and enter diskutil list. Here should see the USB drive listed (in my case it’s /dev/disk2)

In case you’ve only one partition on this USB stick you’ve to convert disk2s2 to a AppleCoreStorage with using you own passphrase. You can do this with the following command.

diskutil cs convert disk2s2 -passphrase yoursupersecurepassphrase

After some minutes the USB stick should be remounted and it’s protect with the passphrase of your choice. When you want you can save the passphrase in your local keychain so that you don’t have to enter it always again.

But in case that someone will “find” your USB-stick, he’ll have no access to the data that are stored on it without knowing the passphrase.

Comment and share

For some reasons it could be necessary to execute a job in scheduled time.
When running the job within a Docker container there’re two ways to do this.

The first would be to create a cron job on the server on which Docker is
running and let them execute the job with docker run.

The second way would be to let do everything within the Docker container.
But you don’t need to implement any scheduling functionality since it’s out of
the box available from any Linux based container.

For example when your container is using the tiny Alpine base image you can use
crond for it. The following code snippets are showing you everything what
is todo.


NOW=$(date +"%T")

echo "Hello from the job at ${NOW} in $(pwd)" >> /dev/stdout


FROM alpine:latest

COPY ./ /etc/periodic/15min/job
RUN chmod +x /etc/periodic/15min/job

CMD ["crond", "-fS"]

The dockerfile is doing two things. It’s copying the into a
predefined folder and mark them as executable.

All scripts that are within this folder will be executed by
crond every 15 minutes. There’re more predefined folders under
etc/periodic to let run a job hourly, daily, weekly or once per month.
In case you need more flexibility you’ve to change the crontabs file for the
root user manually.

The program crond comes with the tiny Alpine image but it will not be
executed automatically as a background daemon.

It’s possible to let run crond as a foreground process, which is intersting
for us. Since we need a process wich is running always, otherwise our Docker
container will be finished immdiately after it was started. So with giving
dockerd the -f flag as argument it will run constantly as a foreground
process and our Docker container will also running continuously.

Please keep in mind that it’s required that the script in the targetfolder
don’t have the .sh extension, otherwise run-parts which is used from
crond, will not use your script.

Please keep also in mind that the workingdirectory where the will be
executed is the /root folder. So maybe you’ve to change
the working directory in the at first before executing whatever
you’ve to execute…

Comment and share

  • page 1 of 1

Jan Baer

I’m a passionated Softwaredeveloper from Munich.