All sizes in MB, change /1024/1024
to /1024/1024/1024
for GB.
Without system databases
select
datname as database,
(pg_database_size(datname)/1024/1024) as size
{-# LANGUAGE DefaultSignatures #-} | |
{-# LANGUAGE DeriveAnyClass #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE EmptyDataDeriving #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeApplications #-} |
#Requires AutoHotkey v2.0 | |
AppVol(Target := "A", Level := 0) { | |
if (Target ~= "^[-+]?\d+$") { | |
Level := Target | |
Target := "A" | |
} else if (SubStr(Target, -4) = ".exe") { | |
Target := "ahk_exe " Target | |
} | |
try { |
Welcome to my blog post for #FsAdvent 2016.
If you're using a relational database, as your application grows in size, at some point you may find yourself looking for an SQL parser. This can give you lots of leverage, for example allowing you to:
#SingleInstance, Force | |
#NoEnv ; somewhat ironic... | |
; this won't work in vista/7 if it's not run as an administrator. | |
; i'm too lazy to request it manually so the easiest way is to | |
; compile this script, and then under Compatibility tab in the | |
; compiled exe's Properties select "Run as Administrator" | |
RegRead, P, HKLM, SYSTEM\CurrentControlSet\Control\Session Manager\Environment, PATH | |
WARNING This list outdated, for the up to date version visit https://haskellcosm.com
Types of work: