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
#!/bin/bash | |
set -o errexit -o pipefail | |
org=dcos-terraform | |
parallel=10 | |
function main { | |
local num_repos=-1 | |
local page=1 | |
local i | |
local x |
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 logging | |
logging.basicConfig() | |
from kazoo.client import KazooClient | |
zk = KazooClient(hosts='10.0.28.160:2181', auth_data=[("digest", "super:xxxxxxxxxx")]) | |
zk.start() | |
data, stat = zk.get("/bouncer/datastore/data.json") | |
text_file = open("data.json", "w") | |
text_file.write(data.decode("utf-8")) |
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 ruby | |
require 'logger' | |
STDOUT.sync = true | |
log = Logger.new(STDOUT) | |
log.level = Logger::DEBUG | |
loop do | |
log.info "Hello World" | |
puts "Hello puts" | |
STDERR.puts "Hello stderr" | |
sleep 30 |
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
CLUSTER_A=olddcos | |
CLUSTER_B=newdcos | |
# BACKUP SERVICES | |
dcos cluster attach $CLUSTER_A | |
curl -H "Authorization: token=$(dcos config show core.dcos_acs_token)" $(dcos config show core.dcos_url)/service/marathon/v2/apps | \ | |
jq '.[] | del(.[].version) | del(.[].uri) | del(.[].versionInfo) | del(.[].tasksStaged) | del(.[].tasksRunning) | del(.[].tasksHealthy) | del(.[].tasksUnhealthy) | del(.[].deployments)' > apps.json | |
for id in $(jq -r '.[] | "\(.id)"' apps.json); do cleanid="${id//\//_}"; jq ".[] | select(.id==\"$id\") | .instances=0" apps.json > service.${cleanid:1}.json; done | |
# BACKUP JOBS |
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 python | |
import os | |
import glob | |
import errno | |
import stat | |
import sys | |
import subprocess | |
def main(argv): |
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
[default] | |
aws_access_key_id = AKIAJQATOQGMX2TOF1CX | |
aws_secret_access_key = I3rNML6Nl0vPbh0CuQdqSQ3LB5kHYAaBrWd+VEho | |
(these are invalid credentials) |
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
Dockerfile: | |
FROM alpine:edge | |
CMD ["Hello World"] | |
ENTRYPOINT ["echo"] | |
{ | |
"id": "/marathon-test", | |
"instances": 1, | |
"container": { |
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
# Create your CA crt and key: | |
openssl req -new -x509 -nodes -newkey rsa:4096 -extensions v3_ca -sha256 -days 3650 -subj "/C=US/ST=CA/L=San Francisco/O=Acme Inc./CN=Acme Insecure Certificate Authority" -keyout ca.key -out ca.crt | |
chmod 600 ca.key | |
# Create a CSR: | |
openssl req -newkey rsa:2048 -nodes -sha256 -keyout cert.key -out cert.csr -subj "/C=US/ST=CA/L=San Francisco/O=Snakeoil Inc./OU=Core/CN=lobotomat.de" | |
# Check contents of CSR (optional): | |
openssl req -in cert.csr -text -noout |
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
tell application "Finder" to tell front window to update every item |
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
#!/bin/bash | |
set -euo pipefail | |
infile="$1" | |
preset=veryfast | |
audiobitrateperchannel=64 | |
ffmpeg_docker='lloesche/nginx-fatpack' | |
originfile=$infile | |
[ ! -f "$infile" ] && \ | |
echo "file $infile not found" && \ |