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
from pyouroboros import VERSION | |
import yaml | |
org = 'pyouroboros' | |
project = 'ouroboros' | |
namespace = f"{org}/{project}" | |
yaml_arr = [] | |
tags = ['latest', VERSION] |
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
--- | |
- name: Configure files | |
hosts: 127.0.0.1 | |
connection: local | |
vars: | |
dirs: | |
dir1: ~/Desktop/dir1 | |
dir2: ~/Desktop/dir1 | |
tasks: | |
- name: whattomine_json |
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
const express = require('express') | |
const passport = require('passport'); | |
const session = require('express-session'); | |
const app = express() | |
app.use(session({secret: "soeffingsecret"})); | |
app.use(passport.initialize()); | |
app.use(passport.session()); |
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 | |
from logging import getLogger, basicConfig | |
def create_logger(): | |
logger = getLogger(__name__) | |
basicConfig(format='[%(levelname)s] %(asctime)s %(message)s', | |
datefmt='%Y-%m-%dT%H:%M:%S', level='INFO') | |
return logger |
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 urllib.request as request | |
import json | |
url = "https://raw.githubusercontent.com/typicode/demo/master/db.json" | |
webURL = request.urlopen(url) | |
data = webURL.read() | |
encoding = webURL.info().get_content_charset('utf-8') | |
JSON_object = json.loads(data.decode(encoding)) |
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
name: "Tomcat 9" | |
description: "Install tomcat 9 from tar via apache US mirror" | |
schemaVersion: 1.0 | |
phases: | |
- name: build | |
steps: | |
- name: install | |
action: ExecuteBash | |
inputs: |
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 ( | |
"flag" | |
"fmt" | |
"log" | |
"os" | |
"path/filepath" | |
"strconv" |
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()) |
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
func buildFulfillment() *Response { | |
return &Response{ | |
Payload{ | |
Google{ | |
ExpectUserResponse: false, | |
RichResponse: RichResponse{ | |
Items: []Item{ | |
{ | |
SimpleResponse: &SimpleResponse{ | |
TextToSpeech: "This is the default audio response", |