Skip to content

Instantly share code, notes, and snippets.

View joshuabergeron's full-sized avatar

Joshua Bergeron joshuabergeron

View GitHub Profile

Keybase proof

I hereby claim:

  • I am joshuabergeron on github.
  • I am jcb (https://keybase.io/jcb) on keybase.
  • I have a public key whose fingerprint is 5BDE 5194 4DDA 4E03 7DD0 D3C1 26E9 1658 61B6 A8C5

To claim this, I am signing this object:

@joshuabergeron
joshuabergeron / tablesizes.sql
Last active December 22, 2015 06:19
Returns size of tables in megabytes for provided DATABASE.
SELECT table_name AS "Tables", round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" FROM information_schema.TABLES WHERE table_schema = "DATABASE";
@joshuabergeron
joshuabergeron / mousey.c
Last active December 22, 2015 06:19
Sometimes my mouse is stuck after a resume on Ubuntu, this fixes it.
/* replace the filename with appropriate usb device info for your computer. get device info from lsusb. */
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <linux/usbdevice_fs.h>
#include <sys/types.h>
#include <unistd.h>