Aaron Zauner azet
-
lambda: resilient.systems
- *
- Sign in to view email
- https://azet.org
View psql_internals_cheatsheet.sql
# long running queries: | |
SELECT | |
pid, | |
now() - pg_stat_activity.query_start AS duration, | |
query, | |
state | |
FROM pg_stat_activity | |
WHERE (now() - pg_stat_activity.query_start) > interval '5 minutes'; | |
## active queries and killing them: |
View numastat_dumb
watch -n1 --differences=cumulative cat /sys/devices/system/node/node*/numastat |
View slabinfo
awk '{printf "%5d MB %s\n", $3*$4/(1024*1024), $1}' < /proc/slabinfo | sort -nr | head -25 |
View chk_pgsql
#!/usr/bin/env python | |
# | |
# keepalived 'track_script' for PostgreSQL 'bgw_replstatus' Plugin | |
# | |
# Author: Aaron Zauner <azet@azet.org> | |
# License: CC0 1.0 Public Domain (https://creativecommons.org/publicdomain/zero/1.0/) | |
# | |
import socket | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
View QSickChill.sh
#! /bin/sh | |
QPKG_NAME=QSickChill | |
QPKG_DIR=$(/sbin/getcfg $QPKG_NAME Install_Path -f /etc/config/qpkg.conf) | |
PID_FILE="$QPKG_DIR/config/sickchill.pid" | |
DAEMON_OPTS="SickBeard.py --datadir $QPKG_DIR/config --daemon --pidfile $PID_FILE --port 7073" | |
# Determin Arch | |
ver="none" |
View opkg-upgrade-all-installed.sh
alias 'opkg-upgrade'='for x in $(opkg list-upgradable | awk "{print $1}"); do opkg upgrade $x ; done' |
View darkmatter.txt
Date: Tue, 5 Apr 2016 16:11:42 +0200 | |
From: Aaron Zauner <azet@azet.org> | |
To: redacted <redacted@arm.co.uk> | |
Subject: Re: LinkedIn | |
Message-ID: <20160405160645.acd82bb63a@64bc86c3c218530> | |
References: <A3BC8318FB5EB6449FE735A962284AC30423B30C4DBB@V-ARM-MAIL1.arm1.com> | |
MIME-Version: 1.0 | |
Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="k+w/mQv8wyuph6w0" | |
Content-Disposition: inline | |
In-Reply-To: <A3BC8318FB5EB6449FE735A962284AC30423B30C4DBB@V-ARM-MAIL1.arm1.com> |
View cros_crouton-chroots-azet
#!/usr/bin/env bash | |
set -e -o pipefail | |
# if you just want/need to update run this script with (.... -u) | |
#[[ -z ${1} ]] && 1="" | |
[[ ${USER} == "chronos" ]] || exit 1 | |
cd ~/Downloads | |
curl -O https://raw.githubusercontent.com/dnschneid/crouton/master/installer/crouton |
View tattoo.tex
%% PoC* by: Karo Kawalle | |
%% PoC* URL: https://twitter.com/a_z_e_t/status/898274928515874816 | |
%% Author: Aaron Zauner <azet@azet.org> [Theorem: Pierre de Fermat] | |
%% Date: 17.08.2017 [18.10.1640] | |
%% License: CC0 1.0 Universal [Public Domain Dedication] | |
%% Depends: `texlive-full latexmk` [on deb/apt based distros] | |
%% Build: `latexmk -pdf tattoo.tex` | |
%% * PoC = "Proof of Concept" (abbreviation) [i.e. implementation] | |
\documentclass[a4paper]{letter} | |
\usepackage{quattrocento, microtype, mathtools} |
View random_part.c
static void fast_mix(struct fast_pool *f) | |
{ | |
__u32 a = f->pool[0], b = f->pool[1]; | |
__u32 c = f->pool[2], d = f->pool[3]; | |
a += b; c += d; | |
b = rol32(b, 6); d = rol32(d, 27); | |
d ^= a; b ^= c; | |
a += b; c += d; |
NewerOlder