Skip to content

Instantly share code, notes, and snippets.

View remove-images.bash
#!/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"
@Cellane
Cellane / README.md
Last active Jan 20, 2020
Check updates for Docker images from Docker Hub or private repository, and deploy updated versions to Dokku
View README.md

Automatic update of Docker image based applications in Dokku

Check updates for Docker images from Docker Hub or private repository, and deploy updated versions to Dokku.

Requirements

  • Bash 4+
  • jq
  • … Dokku, probably? 🤔
View maven-does-not-see-subpackages
/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
View DownloadVideosCommand.swift
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 [] }
View TypeErasure.swift
protocol Query {
associatedtype QueryType
var codingKey: String { get } // set?
}
private class _AnyQueryBase<QueryType>: Query {
var codingKey: String {
get { fatalError("Must override") }
}
View Application+Testing.swift
//
// Application+Testing.swift
// AppTests
//
// Created by Ondrej Rafaj on 27/02/2018.
//
import Foundation
import AppVaporTestTools
import Vapor
import VaporTestTools
View keybase.md

Keybase proof

I hereby claim:

  • I am cellane on github.
  • I am cellane (https://keybase.io/cellane) on keybase.
  • I have a public key ASBDtAvEzN7BaGPdWWWoTWw7ANppkt8C3h22ILqrmbkjKwo

To claim this, I am signing this object:

View 01_FirstVersion.swift
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))
}
View xcode_project.py
#!/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()
View ELSeekableVideoPlayerView.m
//
// ELSeekableVideoPlayerView.m
// CKSiS
//
// Created by Milan Vít on 13.03.17.
// Copyright (c) 2017 EYELEVEL. All rights reserved.
//
#import <Masonry/Masonry.h>
#import "ELSeekableVideoPlayerView.h"