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
defmodule MyApp.Storage do | |
def enable_notifications(bucket) do | |
body = """ | |
<NotificationConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> | |
<QueueConfiguration> | |
<Id>opencake</Id> | |
<Queue>arn:minio:sqs::_:webhook</Queue> | |
<Event>s3:ObjectCreated:*</Event> | |
<Event>s3:ObjectRemoved:*</Event> | |
</QueueConfiguration> |
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
require 'base64' | |
require 'zlib' | |
require 'json' | |
# Sample blueprint, one burner mining drill and one stone furnace | |
blueprint = "0eNqF0N0KwjAMBeB3yXU7ZtkG9lVEZD9xBLpstJ04Rt/ddiIMRb1rCufrSVdozIyTJfagV6B2ZAf6tIKjnmuT7vwyIWggjwMI4HpIUzNbRisHYuJedpaMgSCAuMM76EMQfwXnR0Z5jU7d4i6rwlkAsidP+KyyDcuF56FBG/EvhIBpdDE1cnozSjLPSgFLPByyMqRKb5L6uc6H9+LypMWS2z5694ECbmjdFqiKQhXHXFVlFcIDjTN2Tg==" | |
# @param [String] blueprint | |
# @return [Hash] | |
def blueprint_to_hash(blueprint) |
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
$ git branch -r --merged | | |
grep origin | | |
grep -v '>' | | |
grep -v develop | | |
grep -v release | | |
xargs -L1 | | |
awk '{split($0,a,"/"); print a[2]}' | | |
xargs git push origin --delete |
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
description "God Process Monitoring" | |
author "Christoph Geschwind <[email protected]>" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn # respawn the service if it dies | |
respawn limit 5 10 # stop respawning if it fails 5 times in 10 seconds | |
pre-start script |