Skip to content

Instantly share code, notes, and snippets.

View zhuravskiy's full-sized avatar
🦀

Zhuravskiy Vitaliy zhuravskiy

🦀
  • Belgorod, Russian Federation
View GitHub Profile
@dmitrykustov
dmitrykustov / upgrade-postgres-9.4-to-9.6.md
Last active August 8, 2022 17:52 — forked from dideler/upgrade-postgres-9.3-to-9.4.md
Upgrading PostgreSQL from 9.4 to 9.6 on Debian Jessie

To use the most modern version of Postgres software we need to add postgresql repository. Edit /etc/apt/sources.list or create /etc/apt/sources.list.d/pgdg.list and add there a line: deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main Then import the repository signing key, and update the package lists:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update

Install a new version of PostgreSQL server.

Once the Debian upgrade finished, I used dpkg-query -l postgresql* to check which versions of postgres I have installed.

@timyates
timyates / ACLcounting.md
Last active December 20, 2015 13:29
A quick method for performing Object.count() with Grails and ACL security

When doing pagination in Grails, you need to know the total number of objects a person can see.

When Domain Objects (in this example a Domain Class Project) are secured by ACL, this becomes problematic.

Here's a quick solution to find the number of objects under ACL security that a given user can see.

Basically, if the user is not ROLE_ADMIN, then we join the ACL tables, and return a count of those where the current user is the owner, or has READ | WRITE | ADMINISTRATION flags set