snippet - ArchLinux: windows boot partition
11 Aug, 2021
Add windows boot partition to grub. By default grub doesn't detect other operating systems. You need to get os-prober, it is an optional dependency of grub. Also by default it is disabled, so you...
snippet - Javascript: object keys and values to html table
14 Jun, 2021
Convert javascript object into html table, where keys are in the first column and values are in the second column. This uses plain javascript so you can use it anywhere.
snippet - PHP error: class 'DateTimeZone' not found
1 Mar, 2021
DateTimeZone class is built into php. If you get error that it's missing, then it's namespace problem.
snippet - ERROR: Remote key not fetched correctly from keyserver
8 Feb, 2021
If the error occurs due to keyserver being unable, you can fix it by adding these. When pgp keyservers are missing there are many different errors that might occur. In ArchLinux some of those are...
snippet - Convert interval to number in postgresql
4 Feb, 2021
There is a simple function for when you need to extract count of days from interval. It is returned as as double, but converted to integer in this example. You get interval when you subtract two...
snippet - Azure MSSQL: Create read only user
26 Jan, 2021
How to create reader / read-only user in azure database.
snippet - Set smalldatetime default value to current date/time
25 Jan, 2021
This example shows how to set the default value of a smalldatetime column to current date time.
snippet - Move tables to another schema in Postgres
26 Nov, 2020
This form moves the table into another schema. Associated indexes, constraints, and sequences owned by table columns are moved as well.
schema - Arduino: Turn Relay On and Off with Push Button
12 Sep, 2020
Turn a relay on and off using a push button. When using a pushbutton, you have use a library (don't reinvent the wheel) to control the push button signal. It's called a debounce, taking account in...
snippet - go-pg: Output generated SQL
7 Sep, 2020
go-pg is PostgreSQL client and ORM for Golang. To show generated queries we have to implement some hooks. There are multiple posts about this in issues, this is an exact working example of it.