This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This helps install the latest fishshell on a Raspberry Pi, and was heavily influenced from | |
# https://gist.github.com/AFRUITPIE/1d26d3d15dc43f821a36d7ccc1260a7f | |
# | |
# NOTE: Along with "make"-related dependencies, it also installs 'jq' | |
# | |
# Use at your own risk as I have made no effort to make this install safe! | |
set -e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with table_stats as ( | |
select psut.relname, | |
psut.n_live_tup, | |
1.0 * psut.idx_scan / greatest(1, psut.seq_scan + psut.idx_scan) as index_use_ratio | |
from pg_stat_user_tables psut | |
order by psut.n_live_tup desc | |
), | |
table_io as ( | |
select psiut.relname, | |
sum(psiut.heap_blks_read) as table_page_read, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
usage() | |
{ | |
cat << EOF | |
usage: $0 options | |
This script sets ownership for all tables, sequences, views, and functions for a given schema. | |
Run this script as your postgres OS user. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var oldJQueryEventTrigger = jQuery.event.trigger; | |
jQuery.event.trigger = function( event, data, elem, onlyHandlers ) { | |
console.log( event, data, elem, onlyHandlers ); | |
oldJQueryEventTrigger( event, data, elem, onlyHandlers ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import time | |
import signal | |
import threading | |
import atexit | |
import Queue | |
_interval = 1.0 | |
_times = {} |