Check updates for Docker images from Docker Hub or private repository, and deploy updated versions to Dokku.
- Bash 4+
- jq
- … Dokku, probably? 🤔
defmodule LiveViewStudioWeb.SalesDashboardLive do | |
use LiveViewStudioWeb, :live_view | |
alias LiveViewStudio.Sales | |
def mount(_params, _session, socket) do | |
socket = | |
socket | |
|> assign_stats() | |
|> assign(refresh_interval: 5, refresh_ref: nil) |
#!/bin/bash | |
IGNORED_IMAGES=("busybox" "debian:stretch-slim" "dokku/ambassador" "dokku/letsencrypt" "dokku/s3backup" "dokku/wait" "gliderlabs/herokuish:latest") | |
USED_IMAGES=("${IGNORED_IMAGES[@]}" $(docker container ls -a --format '{{.Image}}' | sort -u | uniq | awk -F ':' '$2{ print $1":"$2 }!$2{ print $1":latest" }')) | |
USED_IMAGE_IDS=() | |
ALL_IMAGE_IDS=($(docker image ls --format '{{.ID}}' | sort -u)) | |
for image in "${USED_IMAGES[@]}"; do | |
IFS=":" read -a parameters <<<"$image" |
/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/bin/java "-Dmaven.multiModuleProjectDirectory=/Users/Milan/Documents/Udemy/Spring Framework 5 Beginner to Guru/sfg-pet-clinic" "-Dmaven.home=/Users/Milan/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/183.4284.118/IntelliJ IDEA 2018.3 EAP.app/Contents/plugins/maven/lib/maven3" "-Dclassworlds.conf=/Users/Milan/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/183.4284.118/IntelliJ IDEA 2018.3 EAP.app/Contents/plugins/maven/lib/maven3/bin/m2.conf" "-javaagent:/Users/Milan/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/183.4284.118/IntelliJ IDEA 2018.3 EAP.app/Contents/lib/idea_rt.jar=50774:/Users/Milan/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/183.4284.118/IntelliJ IDEA 2018.3 EAP.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Users/Milan/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/183.4284.118/IntelliJ IDEA 2018.3 EAP.app/Contents/plugins/maven/lib/maven3/b |
import Command | |
import Console | |
import Crypto | |
import Fluent | |
import FluentSQLite | |
struct DownloadVideosCommand: Command, Service { | |
var arguments: [CommandArgument] { return [] } | |
var options: [CommandOption] { return [] } | |
var help: [String] { return [] } |
protocol Query { | |
associatedtype QueryType | |
var codingKey: String { get } // set? | |
} | |
private class _AnyQueryBase<QueryType>: Query { | |
var codingKey: String { | |
get { fatalError("Must override") } | |
} |
// | |
// Application+Testing.swift | |
// AppTests | |
// | |
// Created by Ondrej Rafaj on 27/02/2018. | |
// | |
import Foundation | |
import AppVaporTestTools | |
import Vapor | |
import VaporTestTools |
I hereby claim:
To claim this, I am signing this object:
private func joinQuery<T: Entity & SoftDeletable, U: Entity>(for entity: T.Type, joined: U.Type) throws -> Query<T> { | |
return try entity | |
.makeQuery() | |
.withSoftDeleted() | |
.join(Pivot<U, T>.self) | |
.join(Join(kind: .inner, base: Pivot<U, T>.self, joined: U.self, baseKey: Pivot<U, T>.leftIdKey, joinedKey: U.idKey)) | |
} |
#!/usr/bin/env python | |
from pbxproj import XcodeProject, PBXShellScriptBuildPhase | |
import subprocess | |
import sys | |
import os | |
process = subprocess.Popen("vapor xcode -n", shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | |
while True: | |
nextline = process.stdout.readline() |