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
COMPOSE := docker-compose -p demouuid | |
start: | |
$(COMPOSE) up -d | |
sleep 3 | |
while $(COMPOSE) ps | grep -q database; do \ | |
$(COMPOSE) logs 2>/dev/null| grep -q 'MySQL init process done.' && break;\ | |
$(COMPOSE) logs 2>/dev/null| grep -i error && break;\ | |
$(COMPOSE) ps | grep -q Exit && break;\ | |
done |
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 debian:10 | |
# install Debian dependencies | |
RUN apt-get update && \ | |
apt-get install -qy subversion git gcc g++ cmake nasm pkg-config \ | |
libgmp-dev gnutls-dev libass-dev libfreetype6-dev libbluray-dev libfribidi-dev libdrm-dev libmp3lame-dev libopus-dev libtheora-dev libvorbis-dev libwebp-dev libx264-dev libx265-dev libzvbi-dev libva-dev && \ | |
rm -rf /var/lib/apt | |
# Install NV codec support | |
WORKDIR /ffmpeg |
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 | |
# As described in https://bugs.launchpad.net/bugs/1766076 | |
### Installation Instructions: | |
# 1. Install file into `/usr/local/bin/reset-tb` | |
# | |
# 2. Optional: allow password less sudo by creating a file `/etc/sudoers.d/allow-reset-tb` with the following content: | |
# ----8<----- | |
# <your username> ALL = NOPASSWD: /usr/local/bin/reset-tb | |
# ----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
import java.io.IOException; | |
import java.io.OutputStream; | |
import io.vertx.core.buffer.Buffer; | |
public class VertxBufferOutputStream extends OutputStream { | |
private Buffer buffer; | |
public BufferOutputStream() { | |
this.buffer = Buffer.buffer(); |
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 | |
function usage() { | |
( | |
echo "usage: $0 <auth-token> <group-address> <mbox-dir>" | |
echo "To generate an auth token go to https://developers.google.com/oauthplayground/ and get an access token for Google Groups migration" | |
) >&2 | |
exit 5 | |
} |
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 tech.greenfield.util.concurrent; | |
import java.util.concurrent.CompletableFuture; | |
import java.util.function.Consumer; | |
import java.util.function.Function; | |
public class Futures { | |
static class Thrower { | |
static Throwable except; |
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/ruby | |
require 'yaml' | |
require 'json' | |
require 'net/http' | |
def get_releases | |
JSON[Net::HTTP.get_response(URI.parse "https://coreos.com/dist/aws/aws-stable.json").body.gsub(/,\s*\]/,"]")] | |
end |
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 | |
( | |
cat <<EOF | |
Mappings: | |
CentOSRegionImages: | |
EOF | |
curl -s 'https://wiki.centos.org/Cloud/AWS' | xmllint -html --xpath '//table[1]/tbody/tr' - | perl -nle ' | |
m|CentOS Linux (\d+)| and $version=$1; |
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/ruby | |
require 'yaml' | |
require 'json' | |
require 'net/http' | |
def get_releases | |
JSON[Net::HTTP.get_response(URI.parse "https://cloud-images.ubuntu.com/locator/ec2/releasesTable").body.gsub(/,\s*\]/,"]")]["aaData"] | |
end |
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
## | |
# | |
# Custom resource setup to provide an identity function that can be used to | |
# implement "custom variables". | |
# See: https://serverfault.com/a/812040/6438 | |
# | |
# Usage: | |
# | |
# After deploying the below code to your stack, you can define computed | |
# variables thus: |