This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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%' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dr-xr-xr-x 25 root wheel 850B Jan 1 1970 bin | |
lrwxr-xr-x 1 root wheel 57B Jan 1 1970 lib -> /nix/store/hhmlcjdlf4mnw58h61283ghj6p7hpf6c-ghc-8.0.2/lib | |
lrwxr-xr-x 1 root wheel 60B Jan 1 1970 manifest.nix -> /nix/store/ryycwmjh0haf79wf99fdl1kzsqhg6w76-env-manifest.nix | |
lrwxr-xr-x 1 root wheel 59B Jan 1 1970 share -> /nix/store/hhmlcjdlf4mnw58h61283ghj6p7hpf6c-ghc-8.0.2/share |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
char *normalize(char *src) { | |
char *r = (char *)(malloc(strlen(src)+2)); | |
char *dst = r; | |
if (*src != '/') { | |
*dst++ = '/'; | |
} | |
char *bt = dst; | |
char *bt2 = dst; | |
int dot = 0; | |
while (*src) { |