Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View stuartmg's full-sized avatar

Stuart Garner stuartmg

View GitHub Profile
#!/bin/bash
if [[ -z "$NGROK_TOKEN" ]]; then
echo "Please set 'NGROK_TOKEN'"
exit 2
fi
if [[ -z "$USER_PASS" ]]; then
echo "Please set 'USER_PASS' for user: $USER"
exit 3

Keybase proof

I hereby claim:

  • I am stuartmg on github.
  • I am sgarner (https://keybase.io/sgarner) on keybase.
  • I have a public key ASAmAqcKADMgQoBkrGmwOR1t9nQ47M_A1Ic-zt1Gu11FXgo

To claim this, I am signing this object:

@stuartmg
stuartmg / cache_hit_ratio.sql
Created April 9, 2013 17:43
Find out cache hit ratio in PostgreSQL. This should ideally be 99% or higher.
SELECT
sum(heap_blks_hit) / (sum(heap_blks_hit) + sum(heap_blks_read)) cache_hit_ratio
FROM
pg_statio_user_tables;