Skip to content

Instantly share code, notes, and snippets.

View Niemi's full-sized avatar

Aleksei Niemi

View GitHub Profile
@Niemi
Niemi / tomcat init.d
Last active August 29, 2015 14:07
tomcat init.d script [SysV] for SLES or OpenSuSe
#!/bin/sh
#source "http://tr.opensuse.org/Tomcat_HOWTO"
# Tomcat Startup Script
### BEGIN INIT INFO
# Provides: Tomcat
# Required-Start: $local_fs $network $remote_fs apache2
# Required-Stop: $local_fs $network $remote_fs apache2
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: Tomcat
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
AddDefaultCharset Off
Order deny,allow
Allow from all
</Proxy>
ProxyPass /myapp ajp://{{IPaddr}}:8009/myapp
ProxyPassReverse /myapp ajp://{{IPaddr}}:8009/myapp
@Niemi
Niemi / ss output
Created November 14, 2013 12:51
check network connection on server with ss
ss -4t -p -e -m -p
@Niemi
Niemi / netstat output
Created November 14, 2013 12:50
useful commands
netstat -ntaoep
@Niemi
Niemi / .screenrc
Created November 14, 2013 12:47
my dotfiles from vim, screen, tmux etc
startup_message off
vbell off
defutf8 on
nonblock on
# Window numbering starts at 1, not 0.
bind c screen 1
bind ^c screen 1
bind 0 select 10
screen 1
altscreen on
@Niemi
Niemi / lsof
Created August 29, 2012 06:58
lsof check
lsof -n -p {procpid}