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 | |
# example: run puppet tests in all modules | |
CMD="pdk test unit --format=junit:report.xml &> pdk_test.log" | |
for d in $(ls -d); do { | |
cd $d | |
$CMD & pid=$! | |
PID_LIST+=" $pid"; | |
cd .. |
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
APP_NAME="<app name from newrelic.cnf" | |
NEW_RELIC_APP_ID=$(curl --silent -X GET 'https://api.newrelic.com/v2/applications.json' -H "X-Api-Key:${NEW_RELIC_API_KEY}" -G -d "filter[name]=${APP_NAME}" | jq -r '.applications[].id') | |
if [ -n $NEW_RELIC_APP_ID ]; then | |
curl -X POST "https://api.newrelic.com/v2/applications/${NEW_RELIC_APP_ID}/deployments.json" \ | |
-H "X-Api-Key:${NEW_RELIC_API_KEY}" -i \ | |
-H 'Content-Type: application/json' \ | |
-d \ | |
"{ | |
\"deployment\": { |
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
# create physical volume | |
pvcreate /dev/<volume_name> | |
# create volume group | |
vgcreate <group_name> /dev/<volume_name> | |
# create volume | |
lvcreate -L <size>G -n <volume_name> <group_name> | |
# create fs |
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
var json = ""; | |
process.stdin.setEncoding('utf8'); | |
process.stdin.on('readable', () => { | |
var chunk = process.stdin.read(); | |
if (chunk !== null) { | |
json += `${chunk}`; | |
} | |
}); |
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
file_line { 'omniauth_crowd-gem': | |
path => '/opt/gitlab/embedded/service/gitlab-rails/Gemfile', | |
line => 'gem "omniauth_crowd", "2.2.2"', | |
require => Package['gitlab'] | |
} | |
file_line { 'patch-devise-rb': | |
path => '/opt/gitlab/embedded/service/gitlab-rails/config/initializers/devise.rb', | |
line => " provider_arguments << provider['args'].symbolize_keys", | |
match => "^ provider_arguments << provider\\['args'\\]\$", |
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 b in $(git branch -r); do | |
if test $b != "origin/HEAD" -a $b != "origin/master" -a $b != "->"; then | |
git branch -rd $b | |
fi; | |
done | |
git gc --aggressive |
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 -e | |
# find out which remote branch is tracked by the current branch | |
branch=$(git symbolic-ref HEAD) | |
branch=${branch##refs/heads/} | |
remote=$(git config "branch.${branch}.remote") | |
remoteBranch=$(git config "branch.${branch}.merge") | |
remoteBranch=${remoteBranch##refs/heads/} |