Welcome to my Blog!
Recent Posts
AWS EC2: Terminate self!
Terminate the current EC2 instance
/usr/bin/aws ec2 terminate-instances --instance-ids $(curl http://169.254.169.254/latest/meta-data/instance-id/) --region $(curl http://169.254.169.254/latest/dynamic/instance-identity/document | grep region | awk '{print $3}' | sed 's/"//g'|sed 's/,//g')
read more
Linux: query remote ntp (and show time difference)
Sometimes you just want to query a remote ntp server (and maybe see the difference between the two clocks). In this case you can use the tool sntp.
From the sntp man page:
The default is to write the estimated correct local date and time (i.e. not UTC) to the standard output….
use something like:
$ sntp at.pool.ntp.org 2018-04-19 11:36:26.538479 (-0100) -0.004752 +/- 0.023788 at.pool.ntp.org 86.59.28.10 s2 no-leap
read more
OpenSSL Cheat Sheat
I know I know, there are plenty of openssl cheat sheets out there already (1 or 2). But as I keep using googling it again and again to find the most useful openssl commands I decided to do my own – the first version of the blog entries is already 3 years old actually. Another reason for creating the list is that I remember things better when I am writing the down.
read more