Skip to content

Instantly share code, notes, and snippets.

@mbecker
mbecker / Postresql_Table_Size.sql
Created November 1, 2018 21:34
Get the tables size of postgreql
SELECT
table_name,
pg_size_pretty(table_size) AS table_size,
pg_size_pretty(indexes_size) AS indexes_size,
pg_size_pretty(total_size) AS total_size
FROM (
SELECT
table_name,
pg_table_size(table_name) AS table_size,
pg_indexes_size(table_name) AS indexes_size,
@mbecker
mbecker / WhatsAppOnlineStatus.js
Last active October 23, 2018 06:29
WhatsApp Online Status
// This script identifies how long a contact is online in the WhatsApp-Webapp
// The contact must have enabled to share his online stats
// 1. Login at the WhatsApp-Webapp: https://web.whatsapp.com/
// 2. Select the contact to watch at
// 3. Open in Chrome the web console via right click and "inspect" (or press 'strg+shift+j')
// 4. Open the 'console' and copy/paste the code; press enter at the end
// 5. Open the printed array in the console and see online status with duration in milliseconds
// The script inspect every x ms if the user is online;
// Test in jsfiddle: http://jsfiddle.net/mbecker/85Lekhtc/53/