Skip to content

Instantly share code, notes, and snippets.

View Niemi's full-sized avatar

Aleksei Niemi

View GitHub Profile
[Unit]
Description=Apache Tomcat Web Application Container
After=network.target
[Service]
Type=forking
Environment=JAVA_HOME=/usr/lib/jvm/latest/jre
Environment=CATALINA_PID=/opt/tomcat/work/tomcat.pid
Environment=CATALINA_HOME=/opt/tomcat
@Niemi
Niemi / ca
Created July 3, 2017 13:11
Apache Cassandra Init.d Script by Author: Eric Evans <eevans@racklabs.com>
#! /bin/sh
### BEGIN INIT INFO
# Provides: cassandra
# Required-Start: $remote_fs $network $named $time
# Required-Stop: $remote_fs $network $named $time
# Should-Start: ntp mdadm
# Should-Stop: ntp mdadm
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: distributed storage system for structured data
@Niemi
Niemi / jenkins_standalone_init.d.sh
Created August 19, 2015 09:16
Init.d script for Jenkins-CI standalone (Tested on Ubuntu 14.04)
#! /bin/sh
#/etc/init.d/jenkins
### BEGIN INIT INFO
# Provides: Jenkins-CI
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Jenkins-server daemon
# Description: "Jenkins CI Server"
@Niemi
Niemi / tls_checker
Created October 13, 2020 17:12
check tls 1.3 connection without nmap
#https://isc.sans.edu/forums/diary/Testing+TLSv13+and+supported+ciphers/25442/
$ for cipher in TLS_AES_128_GCM_SHA256 TLS_AES_256_GCM_SHA384 TLS_CHACHA20_POLY1305_SHA256 TLS_AES_128_CCM_SHA256 TLS_AES_128_CCM_8_SHA256 ; do openssl s_client -tls1_3 -ciphersuites $cipher -connect www.cloudflare.com:443 < /dev/null > /dev/null 2>&1 && echo "$cipher" ; done
@Niemi
Niemi / gist:7c8c326c35885d461ce0272e1d96fb68
Last active February 10, 2023 07:40
Sytemd service spring boot app
[Unit]
Description=Java App
Requires=network.target
After=syslog.target
[Service]
User=tomcat
Group=tomcat
#EnvironmentFile=/etc/profile.d/java
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -Xss256k -Xmx128m -Xms128m -XX:MaxDirectMemorySize=128m'
ExecStart=/usr/bin/java -jar /home/app/app.jar
upstream nexus3 {
server 127.0.0.1:8081;
keepalive 32;
}
server {
listen 80;
server_name nexus.hwdomain.io;
location / {