[Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes("foo"))
[System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String("bar"))
https://docs.cloudera.com/management-console/cloud/user-management/topics/mc-cdp-account-administrator.html | |
https://docs.cloudera.com/management-console/cloud/user-management/topics/mc-configuring-identity-providers.html | |
https://docs.cloudera.com/management-console/cloud/user-management/topics/mc-disabling-the-cloudera-sso-login.html | |
https://docs.cloudera.com/management-console/cloud/user-management/topics/mc-synchronizing-group-membership.html | |
https://docs.cloudera.com/management-console/cloud/user-management/topics/mc-generating-identity-provider-metadata.html | |
#!/bin/sh | |
# Source: http://kubernetes.io/docs/getting-started-guides/kubeadm | |
set -e | |
source /etc/lsb-release | |
if [ "$DISTRIB_RELEASE" != "20.04" ]; then | |
echo "################################# " | |
echo "############ WARNING ############ " |
#!/bin/sh | |
# Source: http://kubernetes.io/docs/getting-started-guides/kubeadm | |
set -e | |
source /etc/lsb-release | |
if [ "$DISTRIB_RELEASE" != "20.04" ]; then | |
echo "################################# " | |
echo "############ WARNING ############ " |
# Setup docker for Amazon Linux | |
sudo yum -y install docker | |
sudo usermod -a -G docker ec2-user | |
newgrp docker | |
sudo systemctl start docker.service | |
# Setup docker for Ubuntu | |
# Tested with Vagrant box ubuntu/focal64 version 20221005.0.0 | |
# Vagrantfile: |
class TokenBucket: | |
def __init__(self, bucketname, hostname, portnumber): | |
self.bucketname = bucketname | |
self.capacity = 1000 # max tokens in bucket | |
self.windowTimeMin = 10 # how many mins to populate bucket with max tokens | |
self.refillTokenPerMin = self.capacity / self.windowTimeMin # e.g. cap = 1000 tokens, window = 10 mins, then add 100 tokens/min | |
self.memcachedClient = Client((hostname, portnumber)) | |
self.tokenBalance = 0 # initial value | |
def getLastRefill(self): |
{ | |
"Statement": [ | |
{ | |
"Action": [ | |
"ecr:GetDownloadUrlForLayer", | |
"ecr:BatchGetImage", | |
"ecr:BatchCheckLayerAvailability", | |
"ecr:PutImage", | |
"ecr:InitiateLayerUpload", | |
"ecr:UploadLayerPart", |
resource "aws_ssm_association" "myapp_adwriter" { | |
name = "myapp_dir_default_doc" | |
instance_id = "${aws_instance.vm_adwriter.id}" | |
depends_on = ["aws_ssm_document.myapp_dir_default_doc", "aws_instance.vm_adwriter"] | |
} |
resource "aws_ssm_document" "myapp_dir_default_doc" { | |
name = "myapp_dir_default_doc" | |
document_type = "Command" | |
content = <<DOC | |
{ | |
"schemaVersion": "1.0", | |
"description": "Join an instance to a domain", | |
"runtimeConfig": { | |
"aws:domainJoin": { |
resource "aws_iam_role_policy" "policy_allow_all_ssm" { | |
name = "IAM_POLICY_ALLOW_ALL_SSM" | |
role = "${aws_iam_role.iam_role_adwriter.id}" | |
policy = <<EOF | |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AllowAccessToSSM", | |
"Effect": "Allow", |