Skip to content

Instantly share code, notes, and snippets.

View donatello's full-sized avatar

Aditya Manthramurthy donatello

  • Bay Area, California
  • 20:29 (UTC -07:00)
View GitHub Profile
#!/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
@donatello
donatello / Dockerfile.dev.tmp
Created February 20, 2017 09:08
Run locally built minio in docker compose cluster.
FROM debian:jessie
COPY ./minio /usr/local/bin/app
EXPOSE 9000
# display version before starting
RUN /usr/local/bin/app version
ENTRYPOINT ["app"]
#!/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
@donatello
donatello / fogtest.rb
Created April 21, 2017 07:24
Test fog lib's streaming signature issue.
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 })
@donatello
donatello / gothreads-experiment.go
Last active April 23, 2017 19:18
Go Threads experiment - write system calls block
package main
import (
"fmt"
"os"
"sync"
)
var (
dir = "/tmp/writetest"
@donatello
donatello / Proposal_mc_find.md
Last active July 5, 2017 18:44
Adding pattern matching to `mc`

Proposal for mc find command

mc find PATH [ACTION [print|exec ARGS...]]
  • PATH is either a file-path or a remote storage alias-path like myminio/mybucket
  • ACTION is a pattern matching expression and should be one of the following:
@donatello
donatello / gcp-minio-manifest-fs.yml
Created June 28, 2017 15:18
CF Manifests examples for Minio
name: minio
director_uuid: d43a09bc-1291-497d-a04d-1b66d883a9b8
releases:
- {name: minio, version: latest}
stemcells:
- alias: bosh-google-kvm-ubuntu-trusty-go_agent
os: ubuntu-trusty
version: latest
instance_groups:
@donatello
donatello / minio-go.diff
Created July 3, 2017 22:53
Check server-side copying of client-side encrypted objects
diff --git a/api_functional_v2_test.go b/api_functional_v2_test.go
index cc35d44..22435a5 100644
--- a/api_functional_v2_test.go
+++ b/api_functional_v2_test.go
@@ -19,6 +19,7 @@ package minio
import (
"bytes"
"errors"
+ "fmt"
"io"
@donatello
donatello / git-ghrw
Created July 19, 2017 12:22
Github review puller git tool
#!/bin/bash
USER=$1
BRANCH=$2
function show_help {
echo <<EOF
Summary:
import sys
import time
_PARALLEL_UPLOADERS = 3
#: Python 2.x?
# _is_py2 = (sys.version_info[0] == 2)
#: Python 3.x?
_is_py3 = (sys.version_info[0] == 3)