Joakim Westin

Curious, autodidact, living with ones and zeros.

Use Azurite wih DuckDb for local development

My favourite tool for ad-hoc data work is now DuckDb. Here I will show you how you can use DuckDb and the Azure Storage Emulator Azurite. docker run -d --name azurite -p 10000:10000 -p 10001:10001 -p 10002:10002 mcr.microsoft.com/azure-storage/azurite Once the emulator is running, create a container and add some files (*.csv or *.parquet) to the container. Then start the DuckDb CLI. Install the Azure extension in DuckDb and configure the secret to use a connection string to the local emulator: ...

September 30, 2024 · 1 min · Joakim Westin

Shokz OpenComm

Earlier this summer I bought myself the Shokz OpenComm headset. I needed a headset that would let me hear my surroundings while still being able to let me hear speech clearly in all circumstances (I’m a volunteer in with Sjödärddningssällskapet and frequently find myself in nosiy environments) After using them for a few months I am a very happy user. They sit comfortably on my ears, they let me hear my surroundings and most importantly - the let me hear all speech clearly, regardless of the surrounding noices. ...

August 10, 2021 · 1 min · Joakim Westin

Azure Cloud Shell

I’ve been working with Azure since well before the days… There have been a lot of confusion and the command line experience have been so-and-so. But today the situation is a lot better when Microsoft have decided to focus on a better CLI for us all. The CLI of preference is built on top of Python. It is available for all popular client platforms. It is also available for those of us who love working in the browser. ...

June 8, 2018 · 1 min · Joakim Westin

Be God

If you want to feel like God in your own Windows 8 universe, try this little powerShell one-liner: New-Item -ItemType Directory -Path "$env:USERPROFILE\Desktop\GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}" This will add an icon to your desktop similar to this one

July 9, 2014 · 1 min · Joakim Westin

Can we have “Latest” URLs for downloads, please!

Background I spend much time hunting for the latest version of software packages. This is part of my job as a consultant. I’m frequently setting up test, demo and prototype environments. I do this in order to keep myself in synch with new technologies. And to help others learn and use new technology. I write presentations, demos, blog posts, instructions, howtos etc. The Problem As the release cycles gets shorter and shorter it is becoming increasingly hard to write good instructions. For example, If I need to explain how to install the latest “Windows Management Framework” I will need a very specific URL. (As of this writing the latest I have found is the may preview) ...

May 24, 2014 · 3 min · Joakim Westin

Installing Ubuntu 14.04 LTS as a Generation 2 Hyper-V guest

Since Microsoft release Windows Server 2012 R2 Hyper-V have had two different generations of virtual machines. The old “Generation 1” and the new “Generation 2”. Microsoft added generation 2 to get rid of the old stuff that really doesn’t make sense in a virtual world. And also to add new stuff. Generation 2 virtual machines provide the following new functionality: PXE boot by using a standard network adapter Boot from a SCSI virtual hard disk Boot from aSCSI virtual DVD Secure Boot (on by default) UEFI firmware support As can be expected all of these features worked fine straight away with Windows 8 (64-bit) and Windows Server 2012 or later. But they did not work well with Linux. Until now. ...

May 21, 2014 · 2 min · Joakim Westin

PowerShell loves enumerations

One of the things that make PowerShell oh-so-great is its tight integration with .NET Framework. As a simple example, in the framework there are many pre-define values, often stored as enumerated types. Enums are great because they allow us to define a set of values and then let the user (or program) choose among these values. Another great thing with PowerShell is that it makes command arguments ‘pickable’ on the command line. So if I’m running a command and I am unsure of which arguments can be used I can simply press tab and I will se the first valid parameter value. Let me show you the simple beauty of Enums together with PowerShell scripts. ...

May 8, 2014 · 2 min · Joakim Westin

$env:HOME doesn’t work in PowerShell $PROFILE

Today I wanted to setup my PowerShell $PROFILE to make it easier to work with all the modules I learned about at the PowerShell Summit. I wanted to add an additional path to the environment variable $PSModulePath. Something that should be a picece of cake. I store additional modules in the folder ‘Documents\WindowsPowerShell\Modules’ under my userdirectory (C:\Users\Joakim). So simply joining the path using Join-Path and add the result to $ENV:PSModulePath should do the trick: ...

May 5, 2014 · 2 min · Joakim Westin

Quick way to name your NICs in Windows Servers

If you, like me, manage many servers, it’s essential to name network adapters in a way that makes it easy to troubleshoot issues when they arise. In complex networks with thousands of servers and all servers connected using multiple paths a consistent naming standard is very important! PowerShell and the cmdlets available in Windows Server makes naming adapters a breeze. The servers we usualy deploy have built in four (4) port network adapters. We like to name the Windows NICs the same as is the default in Linux; eth0, eth1, etc. ...

September 18, 2013 · 1 min · Joakim Westin

Minimal CentOS 6.4 with Hyper-V

Now that CentOS includes the kernel drivers for Hyper-V it is very easy to setup a CentOS 6.4 based server in Hyper-V. Download the “minimal” ISO and create a new Hyper-V VM. Run through the installation and reboot. What you will notice when logging in is that the eth0 NIC has not been started. This is normal and if you want to access the network with a DHCP assigned address simply start the interface: ...

April 13, 2013 · 1 min · Joakim Westin