Sunday, 13 March 2022

Useful kuso queries

Get the latest row for each of the Azure Functions

requests 

| summarize arg_max(timestamp, name) by name, success

| project timestamp, name, success


Friday, 4 March 2022

Git shortcuts

Git

Added to C:\Program Files\Git\usr\bin

With the folder added to the path environment variable

ga.bat

@git add %1

gd.bat

@git difftool %1

gs.bat

@git status %1

Set default branch

git config --global init.defaultBranch main

Git - on Linux

alias gs='git status'
alias gd='git difftool'
alias ga='git add'

Terraform

C:\Program Files (x86)\terraform\tf.bat

@terraform %1 %2 %3 %4 %5






Create SSH key in Windows

 To create a SSH key for Windows:

 ssh-keygen -t ed25519 -C "xxx@email.com"

Sunday, 26 December 2021

Writing a Linux UI app - choosing the framework

Gnome and KDE are desktop environments. Ubuntu defaults to Gnome, but you can switch it to KDE.

Gnome was built using GTK. GTK is written in C and had American roots.

KDE was built using Qt, which is written in C++ and had European roots.

GTK & Qt are application frameworks & widget libraries. Both are built on top of Xlib in Linux.

xlib, the X Library, is the lowest-level API of the X Window program. If compared with Windows, Xlib is the same as the Windows APIs (or Windows SDK). It is the programming interface that is closest to X Server. It only provides the most Basic drawing and handling of message events.

When writing apps, you could also use Electron, which is based upon Javascript and NodeJS.


Friday, 24 December 2021

PC boots into Windows after installing Ubuntu

After installing Ubuntu alongside Windows, the PC would boot into Windows without going into Grub first.

This article explains how to solve it.



Saturday, 13 November 2021

Reinstalling Grub on a dual-boot Windows/Ubuntu laptop

I had a Windows/Ubuntu laptop, and I was forced to reinstall Windows.

Windows replaces grub with it's own bootloader.
This article explains how to get it back without having to reinstall anything.


I followed the steps that involved using boot-repair.

"Boot using a live usb/cd of ubuntu. Use boot-repair to fix the problem."