Skip to content

Instantly share code, notes, and snippets.

View vladget's full-sized avatar

Volodymyr Hetmanshchuk vladget

View GitHub Profile
@llbbl
llbbl / fix_openssl_catalina.sh
Last active November 3, 2023 06:05
fix missing openssl files in catalina
#!/bin/bash
echo 'update brew'
brew update
echo 'upgrade brew'
brew upgrade
@eedugon
eedugon / gitlab-registry.gc.sh
Created July 13, 2017 10:30 — forked from pbabics/gitlab-gc.sh
Manual garbage collector for gitlab registry, it removes old revisions that are not referenced by any tag
#!/bin/bash
# This is a modification of gitlab-gc.sh script created by Peter Bábics (pbabics/gitlab-gc.sh)
# Improvements
# - Searching in all BASE_PATH, not fixing the search to a depth of 2
# - Directories without valid tags or revisions directories won't be processed (to avoid unexpected issues)
# - Logging in case there's nothing to delete
# - running registry-garbage-collect only when something has been deleted
@erikcw
erikcw / nginx.conf
Last active August 22, 2023 10:58
Simple nginx lua script to add UUID to each request for end to end request tracking.
# Dependencies
# nginx_lua
# lua uuid module (luarocks install uuid)
http {
# this will be the request id
map $host $request_uuid {
default '';
}
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 6, 2024 11:39
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%'