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 -euo pipefail | |
# Will only action if DRY_RUN=false | |
DRY_RUN=${DRY_RUN:=true} | |
# Will delete in the following regions | |
regions=( | |
ap-southeast-2 | |
# ap-southeast-4 |
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
class Foo { | |
public: | |
// A purely virtual destructor will prevent this class being instantiated directly | |
virtual ~Foo() = 0; | |
}; | |
class Bar: public Foo { | |
~Bar() override { }; | |
}; |
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
import org.apache.kafka.clients.producer.Partitioner; | |
import org.apache.kafka.common.Cluster; | |
import org.apache.kafka.common.PartitionInfo; | |
import org.apache.kafka.common.utils.Utils; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.concurrent.ConcurrentHashMap; | |
import java.util.concurrent.ConcurrentMap; | |
import java.util.concurrent.ThreadLocalRandom; |
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
package uk.tommyt.kafka.krypto; | |
import org.bouncycastle.jce.provider.BouncyCastleProvider; | |
import javax.crypto.BadPaddingException; | |
import javax.crypto.Cipher; | |
import javax.crypto.IllegalBlockSizeException; | |
import javax.crypto.KeyGenerator; | |
import javax.crypto.NoSuchPaddingException; | |
import javax.crypto.SecretKey; |
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 utils import Checker, CheckError | |
from botocore.exceptions import ClientError | |
import requests | |
class AnonChecks(Checker): | |
def check_anonymous_http_get(self): | |
""" 1 """ | |
r = requests.get("https://{}.s3.amazonaws.com/".format(self.bucket.name)) |
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
touch /boot/ssh | |
add `net.ifnames=0` to /boot/cmdline.txt | |
echo cat <<EOF > /etc/network/interfaces.d/eth0 | |
auto eth0 | |
iface eth0 inet static | |
address 172.16.1.20 | |
netmask 255.255.255.0 | |
gateway 172.16.1.1 |
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
defaults | |
log global | |
timeout connect 5000 | |
timeout client 50000 | |
timeout server 50000 | |
resolvers vpc | |
nameserver aws 172.18.0.2:53 | |
hold valid 10s |
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
+-----------+ | |
|Kinesis |-----\ | |
+-----------+ ---------\ +-----------+ | |
---------\ |Logstash | +-------------+ | |
+-----------+ ------ +-----------+ |Elasticsearch| +-------------+ | |
|Loglet |-\ |-----------| |Client | |Kibana | | |
+-----------+ -\ +--------------------+ -|-----------|---+-------------+---| | | |
-\ | | / |-----------| |-------------| +-------------+ | |
+-----------+ --| |/ |-----------| +-------------+ | |
|Fluentd |--------| Kafka / +-----------+ | \ |
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
kind: ConfigMap | |
apiVersion: v1 | |
metadata: | |
name: sensu-server-conf | |
namespace: cloud | |
data: | |
redis.json: | | |
{ | |
"redis": { | |
"host": "127.0.0.1", |
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
--- | |
kind: ConfigMap | |
apiVersion: v1 | |
metadata: | |
name: kube-dns-autoscaler | |
namespace: kube-system | |
data: | |
linear: |- | |
{ | |
"coresPerReplica": 2, |
NewerOlder