This file contains hidden or 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 | |
SITE=vpns.xx.net | |
cd /etc/letsencrypt/live/$SITE | |
/usr/local/openvpn_as/scripts/sacli --key "cs.priv_key" --value_file "privkey.pem" ConfigPut | |
/usr/local/openvpn_as/scripts/sacli --key "cs.cert" --value_file "fullchain.pem" ConfigPut | |
cat fullchain.pem privkey.pem > bundle.pem | |
/usr/local/openvpn_as/scripts/sacli --key "cs.ca_bundle" --value_file "bundle.pem" ConfigPut | |
/usr/local/openvpn_as/scripts/sacli start |
This file contains hidden or 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
# Xcode | |
# | |
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore | |
## Build generated | |
build/ | |
DerivedData/ | |
## Various settings | |
*.pbxuser |
This file contains hidden or 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
commands: | |
create_pre_dir: | |
command: "mkdir /opt/elasticbeanstalk/hooks/appdeploy/pre" | |
ignoreErrors: true | |
files: | |
"/opt/elasticbeanstalk/hooks/appdeploy/pre/00_setup_swap.sh": | |
mode: "000755" | |
owner: root | |
group: root | |
content: | |
This file contains hidden or 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 | |
#AWS_IP=$(curl https://dnsjson.com/nat.gce-us-central1.travisci.net/A.json) | |
curl https://dnsjson.com/nat.gce-us-central1.travisci.net/A.json | jq -r '.results.records[]' | while read id ; do | |
aws ec2 authorize-security-group-ingress --region eu-west-1 --group-name sg-group-name \ | |
--protocol tcp --port 3306 \ | |
--cidr "${id}"/32 | |
done | |
curl https://dnsjson.com/nat.gce-us-east1.travisci.net/A.json | jq -r '.results.records[]' | while read id ; do |
This file contains hidden or 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 SEMVER_LAST_TAG=$(git describe --tags `git rev-list --tags --max-count=1` 2>/dev/null) | |
export SEMVER_RELEASE_LEVEL=$(git log --oneline -1 --pretty=%B | cat | tr -d '\n' | cut -d "[" -f2 | cut -d "]" -f1) | |
#curl -o /tmp/hub.tgz https://github.com/github/hub/releases/download/v2.2.9/hub-linux-arm64-2.2.9.tgz | |
#tar -xvzf /tmp/hub.tgz -C /tmp | |
if [ -z $SEMVER_LAST_TAG ]; then | |
>&2 echo "No tags defined" |
This file contains hidden or 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 SEMVER_LAST_TAG=$(git describe --abbrev=0 --tags | cat | tr -d 'v' 2>/dev/null) | |
export SEMVER_RELEASE_LEVEL=$(git log --oneline -1 --pretty=%B | cat | tr -d '\n' | cut -d "[" -f2 | cut -d "]" -f1) | |
#curl -o /tmp/hub.tgz https://github.com/github/hub/releases/download/v2.2.9/hub-linux-arm64-2.2.9.tgz | |
#tar -xvzf /tmp/hub.tgz -C /tmp | |
if [ -z $SEMVER_LAST_TAG ]; then | |
>&2 echo "No tags defined" |
This file contains hidden or 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 | |
SITE=xxxx | |
service openvpnas stop | |
cd /etc/letsencrypt/live/$SITE | |
/usr/local/openvpn_as/scripts/sacli --key "cs.priv_key" --value_file "privkey.pem" ConfigPut | |
/usr/local/openvpn_as/scripts/sacli --key "cs.cert" --value_file "fullchain.pem" ConfigPut | |
/usr/local/openvpn_as/scripts/sacli --key "cs.ca_bundle" --value_file "chain.pem" ConfigPut |
This file contains hidden or 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
# Basic example | |
siege -t60s -c20 -d10 'http://robertomurray.co.uk/' | |
# Basic auth; | |
auth=$(echo -n 'username:password' | openssl base64) | |
siege -t60s -c20 -d10 --header="Authorization:Basic $auth" 'https://staging.a-hostname.co.uk/' |
This file contains hidden or 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
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |