Skip to content

Instantly share code, notes, and snippets.

@dannberg
dannberg / obsidian-daily-note-template.txt
Last active May 10, 2024 16:39
Dann Berg's Daily Note Template for Obsidian. Uses Dataview & Templater plugins. Should be saved as a Markdown file in Obsidian. Read the full tour: https://dannb.org/blog/2022/obsidian-daily-note-template/
---
created: <% tp.file.creation_date() %>
---
tags:: [[+Daily Notes]]
# <% moment(tp.file.title,'YYYY-MM-DD').format("dddd, MMMM DD, YYYY") %>
<< [[Timestamps/<% tp.date.now("YYYY", -1) %>/<% tp.date.now("MM-MMMM", -1) %>/<% tp.date.now("YYYY-MM-DD-dddd", -1) %>|Yesterday]] | [[Timestamps/<% tp.date.now("YYYY", 1) %>/<% tp.date.now("MM-MMMM", 1) %>/<% tp.date.now("YYYY-MM-DD-dddd", 1) %>|Tomorrow]] >>
---
@vjeffz
vjeffz / commands.json
Created July 10, 2021 13:57
A list of all the aws-cli command examples from https://docs.aws.amazon.com/cli/latest/reference/
This file has been truncated, but you can view the full file.
{
"acm": {
"AddTagsToCertificate": [
"aws acm add-tags-to-certificate --certificate-arn arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012 --tags Key=Admin,Value=Alice Key=Purpose,Value=Website "
],
"DeleteCertificate": [
"aws acm delete-certificate --certificate-arn arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012 "
],
"DescribeCertificate": [
"aws acm describe-certificate --certificate-arn arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012 "
# Infracost Tool Demonstration
# Importing official atlantis docker image
FROM runatlantis/atlantis:v0.17.0
RUN apk update && apk upgrade
# Python
RUN apk add bash py-pip
@amcginlay
amcginlay / eks.sh
Last active August 11, 2021 12:57
You can reference this file from https://bit.ly/amcginlay-eks
#######################################################################
# TOPICS
#######################################################################
# 1. BUILD CLOUD9 FROM CLOUDSHELL
# 2. BUILD EKS CLUSTER FROM CLOUD9
# 3. BUILD A CONTAINER IMAGE
# 4. PUSH CONTAINER IMAGE TO ECR
# 5. DEPLOY FROM ECR TO K8S
# 6. CONTAINER ORCHESTRATION - balancing that which is desired against that which exists
# 7. K8S CLUSTERIP SERVICES - because pods need to talk to each other
@mikesparr
mikesparr / anthos-gke-aws-setup01.sh
Last active March 27, 2021 18:09
Anthos GKE on AWS (prerequisites)
#!/usr/bin/env bash
# Docs: https://cloud.google.com/anthos/gke/docs/aws/how-to/prerequisites
# NOTE: MUST have `jq` installed for JSON parsing to set ENV vars
export PROJECT_ID=$(gcloud config get-value project)
export PROJECT_USER=$(gcloud config get-value core/account) # set current user
# confirm aws CLI working
aws --version
@Lowess
Lowess / .pre-commit-config.yaml
Last active September 23, 2023 11:34
Jinja2 template to auto-generate atlantis.yaml for Atlantis / Terraform & pre-commit action & shell script
repos:
- repo: https://github.com/lowess/pre-commit-hooks
rev: v1.2.0 # Get the latest from: https://github.com/lowess/pre-commit-hooks/releases
hooks:
- id: jinja2-render-template
name: Render atlantis.yaml configuration
args:
- atlantis.j2
- --output
- atlantis.yaml

搭建基于keycloak认证的ELK日志中心

所有服务使用docker搭建部署,其中keycloak服务已经有,所以在本文中就没有列出。

docker-compose.yml

version: '3'
services:
  elasticsearch:
    image: elasticsearch:7.6.2
    container_name: elasticsearch
## -------------------------- ##
# Values passed to helm chart
## -------------------------- ##
# Kubernetes namespace for atlantis (pods , deployment , service etc.)
namespace: atlantis
# Whitelist Your GitHub infrastructure repository URL. For multiple repositories, comma separate them
orgWhitelist: github.com/yourorg/terraform-infrastructure
# logLevel: "debug"
@dgozalo
dgozalo / eksctl-policy.json
Created January 22, 2020 11:07
This is an AWS IAM Policy needed by eksctl to create and operate an EKS cluster.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iam:CreateInstanceProfile",
"iam:DeleteInstanceProfile",
"iam:GetRole",
"iam:GetInstanceProfile",