Skip to content

Instantly share code, notes, and snippets.

View enoot's full-sized avatar
💭
eben'u

Igor Martynyuk enoot

💭
eben'u
View GitHub Profile
@enoot
enoot / keybase.md
Last active September 20, 2019 13:14

Keybase proof

I hereby claim:

  • I am enoot on github.
  • I am en00t (https://keybase.io/en00t) on keybase.
  • I have a public key ASAqNpALjpUnGa2iyEFgSr6TAia1KvEGDlzASulyh6uPAAo

To claim this, I am signing this object:

@enoot
enoot / postgres_queries_and_commands.sql
Created November 4, 2018 20:46 — forked from rgreenjr/postgres_queries_and_commands.sql
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%'
@enoot
enoot / cors-nginx.conf
Created October 3, 2018 10:24 — forked from michiel/cors-nginx.conf
Wide-open CORS config for nginx
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#
@enoot
enoot / README-tomcat-as-systemd-service.md
Created September 25, 2018 23:14 — forked from drmalex07/README-tomcat-as-systemd-service.md
An example configuration for Tomcat as systemd service. #tomcat #systemd #systemd.service

README

Let Tomcat is download and installed under /opt/tomcat. Also, let tomcat be a non-provileged user under which the server will be running.

We assume that we keep server's binaries under /opt/tomcat and we will create a server instance named foo under /var/tomcat/ (carrying its own conf, logs, webapps, work, lib directories). See also https://dzone.com/articles/running-multiple-tomcat.

Create a template service unit file at /etc/systemd/system/tomcat@.service:

@enoot
enoot / Apache Tomcat 8 Start stop script init.d script
Created September 25, 2018 23:03 — forked from miglen/Apache Tomcat 8 Start stop script init.d script
Apache Tomcat init script (or startup/controll script). Works fine for version 7/8. Read the comments for release history. Feel free to modify, copy and give suggestions. (c) GNU General Public License
#!/bin/bash
#
# description: Apache Tomcat init script
# processname: tomcat
# chkconfig: 234 20 80
#
#
# Copyright (C) 2014 Miglen Evlogiev
#
# This program is free software: you can redistribute it and/or modify it under
@enoot
enoot / nginx.conf
Created July 18, 2018 08:10 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048