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/ruby | |
def chk(file_to_check, cmd) | |
puts "checking '#{file_to_check}'" | |
if !system("hg cat -r tip '#{file_to_check}' | #{cmd} 2>&1") | |
print('!!! Syntax error in file: ' + file_to_check + "\n") | |
exit(1) | |
end | |
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
#!/bin/bash | |
yum install ruby18 rubygems18 -y | |
alternatives --set ruby /usr/bin/ruby1.8 | |
rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm | |
yum install puppet-3.7.3 -y --disableplugin=priorities |
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
class TeamCity | |
def self.running? | |
ENV.include? 'TEAMCITY_PROJECT_NAME' | |
end | |
def self.method_missing(method, *args, &block) | |
return unless running? | |
message_name = camel_case method.to_s | |
publish message_name, args[0] |
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
for /F %%x in ('hg log -r "heads(all()) and closed()" --template "{rev}"\n') do (call :merge "%%x") | |
GOTO :eof | |
:merge | |
hg --config ui.merge=internal:local -y merge --rev %1 | |
hg commit -m merge | |
GOTO :eof |
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 | |
set -x | |
set -e | |
REPO_NAME=production | |
YUM_SERVER_URL=http://localhost:8888/yum-repo-server | |
FILES=*.rpm | |
curl -s -d "name=$REPO_NAME" $YUM_SERVER_URL/repo | |
for f in $FILES | |
do | |
echo "Processing $f file..." |
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
filter { | |
# Format Nginx Error logs | |
if [type] =~ /nginx_.*_error/ { | |
grok { | |
match => { | |
"message" => [ | |
"%{DATESTAMP:timestamp} \[%{DATA:severity}\] (%{NUMBER:pid:int}#%{NUMBER}: \*%{NUMBER}|\*%{NUMBER}) %{GREEDYDATA:message}", | |
"%{DATESTAMP:timestamp} \[%{DATA:severity}\] %{GREEDYDATA:message}", | |
"%{DATESTAMP:timestamp} %{GREEDYDATA:message}" | |
] |
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
docker rm $(docker ps -q -f status=exited) |
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 | |
region=`facter ec2_placement_availability_zone | sed 's/[a-z]$//g'` | |
instanceId=`facter ec2_instance_id` | |
/usr/bin/aws ec2 describe-tags --filters "Name=resource-id,Values=${instanceId}" --region ${region} | jq '.Tags[] | "ec2_tag_" + .Key + "=" + .Value' | tr [:upper:] [:lower:] | tr -d '"' | |
exit 0 |
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/sh | |
set -e | |
set -x | |
#{ | |
#date | |
export [email protected] | |
export zabbixemailto=$1 | |
export zabbixsubject=$2 | |
export zabbixbody=$3 |
OlderNewer