SSH jump host

I am using a server in my tinc to jump inside a private network that is behind a NAT router.

Using ssh commandline:

ssh -J 10.1.7.25 root@192.168.1.44

Where 10.1.7.25 is the jump host and root@192.168.1.44 is the server in the private network.

Or by using the .ssh/config file

Host jump
  Hostname 192.168.1.44
  User root
  ProxyJump 10.1.7.25

And call this using ssh jump.

Further readings:

Microbit start

I have a microbit laying around since forever.

As my first program I wanted a dice rolling using not numbers but images from an array. To compile the program to a .hex file and upload to the microbit I used: makecode.

The program code:

input.onButtonPressed(Button.A, function () {
     dice_num = Math.randomRange(0, 5)
     dice[dice_num].showImage(0)
 })
 let dice_num = 0
 let dice = [images.createImage(`
     . . . . .
     . . . . .
     . . # . .
     . . . . .
     . . . . .
     `), images.createImage(`
     . . . . .
     . # . . .
     . . . . .
     . . . # .
     . . . . .
     `), images.createImage(`
     . . . . .
     . # . . .
     . . # . .
     . . . # .
     . . . . .
     `), images.createImage(`
     . . . . .
     . # . # .
     . . . . .
     . # . # .
     . . . . .
     `), images.createImage(`
     . . . . .
     . # . # .
     . . # . .
     . # . # .
     . . . . .
     `), images.createImage(`
     . . . . .
     . # . # .
     . # . # .
     . # . # .
     . . . . .
     `)]
 basic.showLeds(`
     . . # . .
     . # # . .
     # # # # #
     . # # . .
     . . # . .
     `)
On start the microbit shows an arrow that gives you the hint to press button A.
Pressing button A shows a random dice image from an array.
Not the most beautiful code. But it works and it was a good feeling to see it running and this small computer.

Format USB flash drive

I was in need of a really Windows compatible USB flash drive.
To be sure the drive is compatible I wanted to format it using Windows.
But the drive was used before, so Windows didn't want to format it.
The easiest way was to wipe the drive on linux using

sudo dd if=/dev/zero of=/dev/sdX bs=1k count=2048

After this procedure Windows asks to format the drive when plugged in.