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
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
#!/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
#!/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
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
--- | |
- 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
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
docker run -d --name ouroboros \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
pyouroboros/ouroboros |
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 docker | |
client = docker.from_env() | |
kwargs = { | |
"image":'alpine:3.8', | |
"name": 'test', | |
"command": 'tail -f /dev/null', | |
"detach": True, |
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 docker | |
client = docker.from_env() | |
for container in client.containers.list(): | |
print(container.image.tags[0]) | |
container.kill() | |
client.containers.list() |