Skip to content

Instantly share code, notes, and snippets.

View Niemi's full-sized avatar

Aleksei Niemi

View GitHub Profile
@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"
pki mail.jitter.local certificate "/etc/ssl/mail.jitter.local.crt"
pki mail.jitter.local key "/etc/ssl/private/mail.jitter.local.key"
pki mail.jitter.eu certificate "/etc/ssl/mail.jitter.eu.crt"
pki mail.jitter.eu key "/etc/ssl/private/mail.jitter.eu.key"
queue encryption key "singthesongofthecredentialspostedtogithublalala"
queue compression
expire 6d
# https://gist.github.com/gretel/f458cfcfc63850c3d3f5
#
# $OpenBSD: sysctl.conf,v 1.58 2014/07/11 16:43:07 henning Exp $
#
# This file contains a list of sysctl options the user wants set at
# boot time. See sysctl(3) and sysctl(8) for more information on
# the many available variables.
#
net.inet.ip.forwarding=1 # 1=Permit forwarding (routing) of IPv4 packets
#net.inet.ip.mforwarding=1 # 1=Permit forwarding (routing) of IPv4 multicast packets
@Niemi
Niemi / nginx.conf
Last active August 29, 2015 14:17 — forked from plentz/nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@Niemi
Niemi / tomcat.sh
Last active August 29, 2015 14:10 — forked from collinpeters/tomcat.sh
#!/bin/sh
#
# /etc/init.d/tomcat -- startup script for the Tomcat 7 servlet engine
#
# Modified init-Script from Ubuntu Tomcat init-script
#
# 2010 - Sebastian Mogilowski - http://www.mogilowski.net/2010/12/11/install-tomcat-7-on-debian-lenny-with-virtual-hosts-and-apache2-integration/
# 2012 - Collin Peters - Added debug option
#
### BEGIN INIT INFO
@Niemi
Niemi / tomcat.sh
Last active August 29, 2015 14:10 — forked from MikeN123/tomcat.sh
#!/bin/sh
#
# /etc/init.d/tomcat -- startup script for the Tomcat 7 servlet engine
#
# Modified init-Script from Ubuntu Tomcat init-script
#
# 2010 - Sebastian Mogilowski - http://www.mogilowski.net/2010/12/11/install-tomcat-7-on-debian-lenny-with-virtual-hosts-and-apache2-integration/
# 2012 - Collin Peters - Added debug option
#
### BEGIN INIT INFO
@Niemi
Niemi / gist:9fc35cc74f0e06abf6df
Created November 19, 2014 13:14
Apache 2.4 AJP proxy to Tomcat Example
<VirtualHost *:443>
# General setup for the virtual host
DocumentRoot "/srv/www/htdocs"
ServerName host.example.com
ServerAdmin webmaster@example.com
ErrorLog /var/log/apache2/error_log
TransferLog /var/log/apache2/access_log
CustomLog /var/log/apache2/host.example.com-ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
@Niemi
Niemi / gist:65a6f5eb74d555efa670
Created October 29, 2014 08:05
NFS services in iptables|netfilter
filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [2:200]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p esp -j ACCEPT
@Niemi
Niemi / firewall.sh
Last active August 29, 2015 14:08 — forked from cedricwalter/firewall.sh
#!/bin/bash
# Restrictive Iptables Based Firewall for Webserver script
# Copyright (C) 2012 Cédric Walter - www.waltercedric.com
# Credits to all various authors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
set-option -g status-utf8 on
set -g default-terminal "screen-256color"
set -g history-limit 10000
set -g base-index 1
setw -g utf8 on
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# Set window notifications
setw -g monitor-activity on
set -g visual-activity on
# set -g terminal-overrides "*88col*:colors=88,*256col*:colors=256,xterm*:colors=256"