Skip to content

Instantly share code, notes, and snippets.

View alxschwarz's full-sized avatar

Alexander Feller alxschwarz

View GitHub Profile
server {
listen 81 http2 proxy_protocol;
server_name alexmak.net alexmak.yopp.in www.alexmak.net;
access_log /var/log/nginx/alexmak-ssl-access.log;
error_log /var/log/nginx/alexmak-ssl-error.log;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains;preload;";
location / {
proxy_http_version 1.1;
proxy_pass http://127.0.0.1:80;

Keybase proof

I hereby claim:

  • I am alexfinn on github.
  • I am alxschwarz (https://keybase.io/alxschwarz) on keybase.
  • I have a public key ASDWd0QH_UNPiYPFhVHwSrRGDVarCwFnhcn-sABfUkHXRwo

To claim this, I am signing this object:

@alxschwarz
alxschwarz / gist:152a829845a347414d316683afc80ed0
Created May 16, 2016 11:34
Install clang 3.8 on ubuntu 14.04
curl -sL https://gist.githubusercontent.com/AlexFinn/34e8cb271c7e7ce42f59cdd419dbc16f/raw/e7d939ccf1baeb2831ce0a24e85871979310eba3/install-clang.sh -o /tmp/install-clang.sh && bash /tmp/install-clang.sh
@alxschwarz
alxschwarz / install-clang.sh
Last active June 29, 2016 11:27
clang-3.8.sh
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
print_status() {
echo
echo "## $1"
echo
}
@alxschwarz
alxschwarz / ap-install.sh
Last active February 24, 2016 19:29
Ansible & Packer install sript
#!/bin/bash
echo "#####################################################"
echo " *** Updating cache ***"
echo "#####################################################"
sudo apt-get update -y
echo "#####################################################"
echo "*** Installing software-properties-common package ***"
echo "#####################################################"
sudo apt-get install software-properties-common -y
NGUSERNAME [a-zA-Z\.\@\-\+_%]+
NGUSER %{NGUSERNAME}
NGINXACCESS %{IPORHOST:clientip} \[%{HTTPDATE:timestamp}\] "%{WORD:verb} %{URIPATHPARAM:request} HTTP/%{NUMBER:httpversion}" %{NUMBER:response} (?:%{NUMBER:bytes}|-) (?:"(?:%{URI:referrer}|-)"|%{QS:referrer}) %{QS:agent} %{NUMBER:request_time} %{NUMBER:upstream_responce_time}
log_format logstash '$remote_addr [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" '
'$request_time '
'$upstream_response_time';
@alxschwarz
alxschwarz / newrelic.yml
Created February 20, 2015 09:31
Example ansible tasks for newrelic package installing
---
- name: Install the NewRelic rpm from a remote repo
yum: name=http://download.newrelic.com/pub/newrelic/el5/i386/newrelic-repo-5-3.noarch.rpm state=present
tags: newrelic
- name: Temporary disabling SELinux
command: setenforce 0
- name: Install NewRelic monitoring package
yum: name=newrelic-sysmond state=latest
@alxschwarz
alxschwarz / node.service
Created August 29, 2014 19:10
Example systemd file for Node.js service
[Service]
WorkingDirectory=/srv/ajs-node/current/
ExecStart=/usr/bin/npm start
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=ajs-node
User=ajs
Group=ajs
@alxschwarz
alxschwarz / jira.service
Created August 29, 2014 19:08
systemd service file for Atlassian Jira
[Unit]
Description=Atlassian Jira Service
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/opt/atlassian/jira/bin/start-jira.sh
ExecStop=/opt/atlassian/jira/bin/stop-jira.sh
[Install]