It is most convenient to use Docker to do this.
A Kafka setup is required (and this requires a Zookeeper setup). A Kafka consumer is needed to check the events sent to Kafka. I used kafkacat.
package main | |
import ( | |
"fmt" | |
"os" | |
"sync" | |
) | |
var ( | |
dir = "/tmp/writetest" |
require 'fog' | |
s3 = Fog::Storage::AWS.new( | |
aws_access_key_id: 'minio', | |
aws_secret_access_key: 'minio123', | |
endpoint: 'http://localhost:9000', | |
path_style: true | |
) | |
dir = s3.directories.get('test', { max_keys: 1 }) |
#!/usr/bin/env stack | |
-- stack --resolver lts-6.27 runghc --package minio-hs --package optparse-applicative --package filepath | |
-- | |
-- Mar. 3 2017 -- using github.com/minio/minio-hs (master) to test | |
-- copyobjectpart fix | |
{-# Language OverloadedStrings, ScopedTypeVariables, NoImplicitPrelude, RankNTypes #-} | |
import Protolude |
FROM debian:jessie | |
COPY ./minio /usr/local/bin/app | |
EXPOSE 9000 | |
# display version before starting | |
RUN /usr/local/bin/app version | |
ENTRYPOINT ["app"] |
#!/bin/bash | |
set -x | |
for i in $(seq 10); do | |
sudo iptables -I INPUT -p tcp --dport 9000 -j REJECT --reject-with tcp-reset | |
mc ls myminio/bucket | |
sudo iptables -D INPUT -p tcp --dport 9000 -j REJECT --reject-with tcp-reset | |
echo | |
mc cp --quiet /tmp/config-err-qSJmsi myminio/bucket/$i | |
echo |
It is most convenient to use Docker to do this.
A Kafka setup is required (and this requires a Zookeeper setup). A Kafka consumer is needed to check the events sent to Kafka. I used kafkacat.
#!/bin/bash | |
GODOWNLOAD=go1.9.1.linux-amd64.tar.gz | |
GOURL=https://storage.googleapis.com/golang/$GODOWNLOAD | |
INSTALL_ARG=$1 | |
if [ -z $INSTALL_ARG ]; then | |
echo "Please specify an install location on the command line." | |
exit 1 |
-- Display table and index sizes | |
SELECT | |
table_name, | |
pg_size_pretty(table_size) AS table_size, | |
pg_size_pretty(indexes_size) AS indexes_size, | |
pg_size_pretty(total_size) AS total_size | |
FROM ( | |
SELECT | |
table_name, | |
pg_table_size(table_name) AS table_size, |
NOTE: 534 stars, 106 forks. I love you all. Please contribute tips and edits back to this cheat sheet -- email's [email protected] and you can treat gists like git repositories and send git diffs.
I hereby claim:
To claim this, I am signing this object: