Skip to content

Instantly share code, notes, and snippets.

View tomka's full-sized avatar

Tom Kazimiers tomka

  • kazmos GmbH
  • Dresden, Germany
View GitHub Profile
#!/usr/bin/env sh
# Watch Al Jazeera live stream with mplayer. You can specify the
# quality as argument by passing either "low", "high" or "veryhigh"
# to the script. If nothing is given it defaults to "veryhigh".
function printUsage() {
echo "Please pass no arguments or either \"low\", \"high\" or \"veryhigh\". No arguments defaults to \"veryhigh\"."
}
# default quality
@tomka
tomka / postgres_queries_and_commands.sql
Created June 24, 2016 19:00 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@tomka
tomka / arch_on_zfs.txt
Created April 16, 2024 18:27 — forked from Soulsuke/arch_on_zfs.txt
Arch on zfs root + native encryption at rest + ZfsBootMenu (UEFI without another bootloader)
NOTE: requires an EFI bios, so zfs will not use the whole disk as this is a single disk scenario.
/*\
|* Prerequisite: preare archiso with zfs support
\*****************************************************************************/
// 0. Do everything as root.
@tomka
tomka / arch_on_zfs.txt
Created April 16, 2024 18:27 — forked from Soulsuke/arch_on_zfs.txt
Arch on zfs root + native encryption at rest + ZfsBootMenu (UEFI without another bootloader)
NOTE: requires an EFI bios, so zfs will not use the whole disk as this is a single disk scenario.
/*\
|* Prerequisite: preare archiso with zfs support
\*****************************************************************************/
// 0. Do everything as root.