Skip to content

Instantly share code, notes, and snippets.

View lym's full-sized avatar
🎾

salym lym

🎾
View GitHub Profile
@lym
lym / get_db_owner
Created January 15, 2015 16:05
postgresql: retrieve owner of specified database
SELECT d.datname as "Name",
pg_catalog.pg_get_userbyid(d.datdba) as "Owner"
FROM pg_catalog.pg_database d
WHERE d.datname = 'database_name'
ORDER BY 1;
@lym
lym / gist:9994702
Created April 5, 2014 17:06
Install chrome java plugin on Ubuntu
$ mkdir /opt/google/chrome/plugins; # and cd into it
$ sudo apt-get install icedtea-6-plugin # install icedtea, depending on your open-jdk version, of course.
$ sudo ln -s /usr/lib/jvm/java-6-openjdk/jre/lib/i386/IcedTeaPlugin.so # create symbolic link, depending on your processor architecture
# that's it, start/restart chrome and you're off :-)
@lym
lym / gist:8498336
Last active January 3, 2016 17:49
remove/unistall old or unused kernels from you ubuntu box.
$ uname -r # to get the current functional kernel
$ dpkg --list | grep linux-image # use your imagination.
$ sudo apt-get purge linux-image-x.x.x.x-generic # or whatever the name of the version you want to uninstall is.
@lym
lym / gist:8269619
Last active January 2, 2016 07:19
Fix the Ubuntu GPG BADSIG Error. Adopted from: http://www.ubuntugeek.com/how-to-fix-the-ubuntu-gpg-error-badsig.html
$ sudo -i
# apt-get clean
# cd /var/lib/apt
# mv lists lists.old
# mkdir -p lists/partial
# apt-get clean