My newest toy is a Garmin Fenix 5 Plus, a very nice smartwatch. In the past, I recorded my steps and other activity data using the Apple Health app on my iPhone. This means that I had a few years worth of activity data that I wanted to move from my Apple Health app to Garmin Connect.
However, that turned out to be not that straight-forward. Garmin only allows you to import GPX, FIT or Fitbit CSV files, not any Apple Health data.
Read the rest of this entry
So I started working with GitLab (self-hosted and gitlab.com), which led me to the CI/CD features of GitLab. When using GitLab, one can define a custom CI pipeline just by placing a .gitlab-ci.yml
file in your project (just like the .travis.yml
for GitHub). After each commit to the defined git branch, the pipeline is then executed.
Since I also work with Ansible playbooks a lot, I wanted to use ansible-lint
to check my playbooks after each commit. In addition to that, I also added a syntax check using ansible-playbook [..] --syntax-check
, as ansible-lint
will not pick up all syntax errors.
So here is my .gitlab-ci.yml
:
Read the rest of this entry
So when working with a lot of different namespaces in Kubernetes and you only know the “oc project” command from OpenShift, you start to miss an easy way to change namespaces in Kubernetes.
The official documentation to switch namespaces proposes something like this:
$ kubectl config set-context $(kubectl config current-context) --namespace=<insert-namespace-name-here>
Not something that I want to type regularly. First I tried to create a BASH alias or something, which did not work. So I looked around for BASH functions. I found that Jon Whitcraft proposed a nice BASH function in a GitHub issue. I lightly modified this and placed this in my own .bashrc
file:
function kubectlns() {
ctx=`kubectl config current-context`
ns=$1
# verify that the namespace exists
ns=`kubectl get namespace $1 --no-headers --output=go-template={{.metadata.name}} 2>/dev/null`
if [ -z "${ns}" ]; then
echo "Namespace (${1}) not found, using default"
ns="default"
fi
kubectl config set-context ${ctx} --namespace="${ns}"
}
So to change your namespace, use something like this:
$ kubectlns simon
Context "kubernetes-admin@kubernetes" modified.
Nice and short.
Anyone who has worked with Oracle has encountered the Oracle “hr” schema in one way or another. The Oracle example schema provides a few simple tables with example data to test out some queries or learn SQL.
So when working with MySQL, I like to have the same schema as well. Luckily, Andrei Ciobanu feels the same way and he provides a wonderful adaptation of this sample schema for MySQL on his website: HR Schema for MySQL and Maria DB.
The SQL script for the schema can be found on GitHub: nomemory/hr-schema-mysql (or in my fork: simonkrenger/hr-schema-mysql).
Thank you Andrei!
So recently I stumbled across a programming quiz to which I later returned because it somehow fascinated me.
Problem
Finding the first available number (or the smallest missing number) in a list is a common problem in Computer Science (for example for Defragmenting or generating keys) and describes the search for the smallest natural number, which is not part of a set X of natural numbers. X is a set of distinct natural numbers (and being a set, is not ordered).
We are now looking for a function with linear worst-case time complexity O(n).
Example
We define X as a set of distinct natural numbers:
X = {23,9,12,0,11,1,13,7,21,14,5,4,17,19,3,6,2}
So in this set, we find that the number 8 is the first available number (smallest missing number). So running the algorithm over the above set should return 8.
Read the rest of this entry
Ok, so here is a problem that a developer brought up. I thought that this problem is quite interesting and also a bit confusing. Obviously, according to Oracle, this is not a bug – it’s a feature!
When issuing a CREATE MATERIALIZED VIEW statement for a different schema (as DBA), one might encounter the following error:
dba@KDB01:SQL> CREATE MATERIALIZED VIEW simon.simon_mv AS SELECT * FROM dual;
CREATE MATERIALIZED VIEW simon.simon_mv AS SELECT * FROM dual
*
ERROR at line 1:
ORA-01031: insufficient privileges
For our setup let’s assume we have two users:
Read the rest of this entry
So here is another post I keep for my own reference, since I keep forgetting about precision and scale, primarily which is which.
The Oracle Concepts guide states that the NUMBER datatype stores fixed and floating-point numbers. A column with the NUMBER datatype can be defined as follows:
Read the rest of this entry
Recently, Tanuki Software released a new version of the Tanuki Service Wrapper (version 3.5.16). I am happy to make a compiled version of the Tanuki Service Wrapper for Windows Server (64-bit) available to you.
As always, I don’t guarantee anything, so please note:
Read the rest of this entry
I always like comments in my blog and someone nicely asked if I could provide a new build for the Tanuki Service Wrapper for Windows x64 (Community Edition). Sure I can! Find the download link below.
As always, I don’t guarantee anything, so please note:
Read the rest of this entry
Due to a a request, I am uploading a more current version of the Tanuki Service Wrapper for Windows x64 (Community edition). I used these instructions to build the wrapper. Find the download link below.
As always, I don’t guarantee anything, so please note:
Read the rest of this entry