Skip to content

Instantly share code, notes, and snippets.

View koolhead17's full-sized avatar

koolhead17 koolhead17

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
cd $GOPATH/src/github.com/minio/minio
git remote add dc https://github.com/dutchcoders/minio.git
git fetch dc feature-gateway-cache
git checkout dc/feature-gateway-cache
go build
MINIO_ACCESS_KEY=Q3AM3UQ867SPQQA43P2F MINIO_SECRET_KEY=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG ./minio gateway s3 https://play.minio.io:9000
$ wget https://dl.minio.io/server/minio/release/linux-amd64/minio
$ chmod 755 minio
$ sudo cp minio /usr/local/bin/
$ whoami
  ubuntu
$ sudo su
# cat <<EOT >> /etc/default/minio
> MINIO_VOLUMES="/tmp/myvolume"
> EOT
images/venture-deals.pdf | {"Records": [{"s3": {"bucket": {"arn": "arn:aws:s3:::images", "name": "images", "ownerIdentity": {"principalId": "M004Y9P10IBN6BWLB2IY"}}, "object": {"key": "venture-deals.pdf", "eTag": "98ae0bb7ee5e4fa4d955dbca62910939", "size": 1674638, "sequencer": "14B05DF605D797BD"}, "configurationId": "Config", "s3SchemaVersion": "1.0"}, "source": {"host": "10.0.0.4", "port": "57731", "userAgent": "Minio (darwin; amd64) minio-go/2.0.4 mc/DEVELOPMENT.GOGET"}, "awsRegion": "us-east-1", "eventName": "s3:ObjectCreated:Put", "eventTime": "2017-03-29T13:39:47Z", "eventSource": "minio:s3", "eventVersion": "2.0", "userIdentity": {"principalId": "M004Y9P10IBN6BWLB2IY"}, "responseElements": {"x-amz-request-id": "14B05DF605D797BD", "x-minio-origin-endpoint": "http://10.0.0.5:9000"}, "requestParameters": {"sourceIPAddress": "10.0.0.4:57731"}}]}
images/the fasting cure.pdf | {"Records": [{"s3": {"bucket": {"arn": "arn:aws:s3:::images", "name": "images", "ownerIdentity": {"principalId": "M004Y9P10IBN6BWL
@koolhead17
koolhead17 / postgres-json-cheatsheet.md
Created March 29, 2017 07:22 — forked from rmtsrc/postgres-json-cheatsheet.md
Using JSON in Postgres by example

PostgreSQL JSON Cheatsheet

Using JSON in Postgres by example.

Quick setup via Docker

  1. Download and install: Docker Toolbox
  2. Open Docker Quickstart Terminal
  3. Start a new postgres container:
    docker run --name my-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres

Install Setup [running on ubuntu 16.04]

1. Install go 1.7.5

sudo apt-get install git 
wget https://storage.googleapis.com/golang/go1.7.5.linux-amd64.tar.gz
tar -C ${HOME} -xzf go1.7.5.linux-amd64.tar.gz

Add the following exports to your ~/.bashrc.

OS: Ubuntu 16.04
1. Install nginx : nginx version: nginx/1.10.0 (Ubuntu)
2. Install Minio: Follow https://github.com/minio/minio
3. Install MC client: Follow https://github.com/minio/mc
4. Create a bucket:
$ mc mb myminio/static
Bucket created successfully ‘myminio/static’.
Fork to your github repo: https://github.com/minio/minio-service
## Clone your local repo:
git clone https://github.com/koolhead17/minio-service
## Create a remote directory branch for minio-service
git remote add koolhead17 git@github.com:koolhead17/minio-service.git
## Note
- Replace ``User=minio-user`` and ``Group=minio-user`` in minio.service file with your local setup.
- Ensure that ``MINIO_VOLUMES`` source has appropirate write access.
@koolhead17
koolhead17 / minio-kafka-notification-dev.org
Created March 10, 2017 09:47 — forked from donatello/minio-kafka-notification-dev.org
How to develop/test Minio event notifications to Kafka

How to develop/test Minio event notifications to Kafka

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.

Kafka Setup in Docker