This file contains hidden or 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 | |
| # usage: ./minio-upload my-bucket my-file.zip minio-host.com access_key secret | |
| bucket=$1 | |
| file=$2 | |
| minio_host=$3 | |
| access_key=$4 | |
| secret=$5 |
This file contains hidden or 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
| function textSize(text) { | |
| if (!d3) return; | |
| var container = d3.select('body').append('svg'); | |
| container.append('text').attr({ x: -99999, y: -99999 }).text(text); | |
| var size = container.node().getBBox(); | |
| container.remove(); | |
| return { width: size.width, height: size.height }; | |
| } | |
| // Usage: textSize("This is a very long text"); |