This file contains 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
--- | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: splunkconf | |
data: | |
default.yml: | | |
splunk: | |
conf: | |
- key: savedsearches |
This file contains 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
policies: | |
- name: add-lifecycle-policy-on-bucket-delete | |
comments: | | |
In dev, let's start emptying the bucket as soon as delete is requested so that we can have a more ephmeral environment for standup/teardown | |
resource: s3 | |
mode: | |
type: cloudtrail | |
role: cloud-custodian-role | |
execution-options: | |
log_group: cloud-custodian |
This file contains 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 docker.authz | |
default allow = false | |
allow { | |
not deny | |
} | |
deny { | |
builds_with_cache | |
} |
This file contains 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
#!/usr/bin/env python3 | |
import argparse | |
from datetime import datetime | |
from os.path import isfile | |
from logging import getLogger, basicConfig | |
# Format used for time range input and parsing strings to date objects (ms) | |
time_format = '%Y-%m-%d %H:%M:%S.%f' | |
# Validate user input of timeframes |
This file contains 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 main | |
import ( | |
"fmt" | |
"github.com/gocolly/colly/v2" | |
) | |
func main() { | |
c := colly.NewCollector( |
This file contains 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
#!/usr/bin/env bash | |
function parse_yaml { | |
local prefix=$2 | |
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') | |
sed -ne "s|^\($s\):|\1|" \ | |
-e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \ | |
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | | |
awk -F$fs '{ | |
indent = length($1)/2; |
This file contains 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 main | |
import ( | |
"net/http" | |
"github.com/gin-gonic/gin" | |
log "github.com/sirupsen/logrus" | |
) | |
// Modeled after google docs |
This file contains 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
func buildFulfillment() *Response { | |
return &Response{ | |
Payload{ | |
Google{ | |
ExpectUserResponse: false, | |
RichResponse: RichResponse{ | |
Items: []Item{ | |
{ | |
SimpleResponse: &SimpleResponse{ | |
TextToSpeech: "This is the default audio response", |
This file contains 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
// Modeled after google docs | |
// https://developers.google.com/assistant/conversational/responses#browsing_carousel | |
// Response is the entire JSON payload response | |
type Response struct { | |
Payload Payload `json:"payload"` | |
} | |
// Payload is a google defined higher structure, see https://developers.google.com/assistant/conversational/responses#browsing_carousel | |
type Payload struct { |
This file contains 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 main | |
import ( | |
"net/http" | |
"github.com/gin-gonic/gin" | |
log "github.com/sirupsen/logrus" | |
) | |
func handleWebhook(c *gin.Context) { | |
c.JSON(http.StatusOK, buildFulfillment()) |
NewerOlder