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 | |
build=alpha # define build ["stable", "beta", "alpha"] | |
disk=hvm # define disk backing ["pv", "hvm"] | |
if [ "x$1" = "x" ]; then | |
echo "Usage: $0 REGION"; exit 1 | |
fi | |
#### deprecated |
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
FROM philcryer/min-jessie:latest | |
MAINTAINER Phil Cryer <[email protected]> | |
RUN apt-get update \ | |
&& apt-get install -yq --no-install-recommends python-pip \ | |
&& pip install awscli \ | |
&& apt-get clean -y \ | |
&& apt-get autoclean -y \ | |
&& apt-get autoremove -y \ | |
&& rm -rf /usr/share/locale/* \ |
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
"UserData": { | |
"Fn::Base64": { | |
"Fn::Join": [ | |
"", | |
[ | |
"#cloud-config\n\ncoreos:\n etcd:\n addr: $", | |
{ | |
"Ref": "AdvertisedIPAddress" | |
}, | |
"_ipv4:4001\n peer-addr: $", |
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 | |
set -e | |
# oneshot | |
# gist_id="b213be6ac41505912875"; curl -s -k -o tmp https://gist.github.com/philcryer/$gist_id/download; tar -xf tmp; mv gist$gist_id-*/ann .; rm -rf gist$gist_id-* tmp; chmod a+x ann | |
ann-usage(){ | |
cat <<EOM | |
Usage: ann |
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
idea inspired by: https://paulschreiber.com/blog/2015/04/12/presidential-candidate-website-tech-compared/ | |
scanning and details provided by https://securityheaders.com/test-http-headers.php | |
hillaryclinton.com Header Analysis | |
The HTTP headers we saw when we visited hillaryclinton.com... | |
HTTP/1.1 302 Moved Temporarily | |
Content-Length: 154 | |
Content-Type: text/html |
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
global | |
log 127.0.0.1 syslog info | |
daemon | |
user haproxy | |
group haproxy | |
maxconn 64000 | |
spread-checks 4 | |
tune.ssl.default-dh-param 2048 | |
defaults |
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
#### sshd_config (/etc/sshd/sshd_config) | |
#### philcryer/secure-sshd | |
#### 2015-03-23 / mit licensed | |
#### after any changes, test with | |
#### /usr/sbin/sshd -t -k sshd_config | |
# Ports (move from default to protect against drivebys) | |
Port 22122 | |
# ??? |
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 | |
if [ ! $1 ]; then | |
echo "! fail - no logdestination at $1 - need hostname:port of log server"; exit 1 | |
fi | |
if [ ! -f Dockerfile ]; then | |
echo "! fail - no Dockerfile file found"; exit 1 | |
fi |
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
# "WPK Central Committee and Central Military Commission Publish Joint Slogans" | |
# taken from http://kcnawatch.nknews.org/article/e2o1 | |
# possibly useful for future slogans | |
# 2015/02/15 | |
Let us all turn out in the general offensive to hasten final victory in the revolutionary spirit of Paektu! | |
Let us greet the 70th anniversaries of national liberation and Party founding with high political enthusiasm and brilliant labour feats! | |
Let us glorify the 70th anniversaries of national liberation and Party founding as revolutionary, auspicious events noteworthy in the history of Kim Il Sung's nation and Kim Jong Il's Korea! |
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 | |
# tally the votes each canidate recieved in the election | |
in=/tmp/2012_GENERAL.txt | |
out=/tmp/2012_GENERAL-results.txt | |
if [ ! -f "${in}" ]; then | |
echo -n "> Downloading file..." | |
curl -s http://www.analyzethevote.com/download/2012_GENERAL.txt -o $in |