Skip to content

Instantly share code, notes, and snippets.

View alenkovich's full-sized avatar

Alen Vodopijevec alenkovich

  • Rudjer Boskovic Institute
  • Zagreb
View GitHub Profile
@hrenki
hrenki / EPrints view only by authors that have id
Last active February 9, 2017 13:22
EPrints view only by authors that have id
in cfg.d create file z_FILE_NAME.pl
in that file is definition of an eprint automatic field that is stored with eprint if creators have an ID
that way we can use only those authors/creators that have matching ID
next we have to update database
/usr/share/eprints3/bin/epadmin update ARHCIVE
afther that we have to recommit all eprints so autocomplete field can create those values for stored eprints
/usr/share/eprints3/bin/epadmin recommit ARCHIVE eprint
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 14, 2024 11:33
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'