This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def string_replace(init_string, replace_string, file_name) | |
file = File.new(file_name) | |
lines = file.readlines | |
file.close | |
changes = false | |
x = 0 | |
lines.each do |line| | |
changes = true if line.sub!(init_string, replace_string) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
import subprocess | |
import shutil | |
import socket | |
def detect_coredump(): | |
os.chdir("/var/crash") | |
return os.path.isfile("_var_games.0.crash") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!upstart | |
description "Upstart script for LXC Web Panel " | |
author "Alexander 'AlexFinn' Ivanov <[email protected]>" | |
start on net-device-up | |
stop on shutdown | |
script | |
WORK_DIR="/srv/lwp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Service] | |
WorkingDirectory=/srv/ajs-node/current/ | |
ExecStart=/usr/bin/npm start | |
Restart=always | |
StandardOutput=syslog | |
StandardError=syslog | |
SyslogIdentifier=ajs-node | |
User=ajs | |
Group=ajs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
log_format logstash '$remote_addr [$time_local] ' | |
'"$request" $status $body_bytes_sent ' | |
'"$http_referer" "$http_user_agent" ' | |
'$request_time ' | |
'$upstream_response_time'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export DEBIAN_FRONTEND=noninteractive | |
print_status() { | |
echo | |
echo "## $1" | |
echo | |
} |
OlderNewer