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
// | |
// Add transparent horizontal stripes to an image. | |
// | |
// Usage: | |
// go run stripes.go image.png 6 12 420 | |
// | | | | | |
// | | | `- top and bottom padding | |
// | | `---- space between stripes | |
// | `------ stripes width | |
// `---------------- original file name or path |
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
# on host | |
# follow https://github.com/ccrisan/motioneyeos/wiki/Installation | |
# download "motioneyeos-raspberrypi-20200606.img.xz" release from: | |
# https://github.com/ccrisan/motioneyeos/releases | |
# setup script | |
wget https://raw.githubusercontent.com/ccrisan/motioneyeos/master/writeimage.sh | |
chmod +x writeimage.sh |
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
# on host: | |
# write an os image to the sd card: | |
# https://www.raspberrypi.org/documentation/installation/installing-images/README.md | |
# setup wifi (in boot): | |
# https://www.raspberrypi.org/documentation/configuration/wireless/headless.md | |
vim wpa_supplicant.conf | |
#ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
#update_config=1 |
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
#!/usr/bin/env bash | |
# | |
# Requirements: | |
# apt install imagemagick pngquant | |
# | |
# Usage: | |
# resize-and-compress-images.sh MAX_WIDTH | |
# |
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
#!/usr/bin/env bash | |
MAX_WIDTH=800 | |
echo "Looking for images..." | |
find . -name "*.png" -o -name "*.jpg" -o -name "*.jpeg" | | |
while read name; do | |
width=$(identify -format "%w" "$name") | |
if [ "$width" -gt "$MAX_WIDTH" ]; then |
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
ffmpeg\ | |
-i in.mp4\ | |
-an\ | |
-vf "setpts=PTS/3,transpose=2,transpose=2"\ | |
-r 30\ | |
-vcodec libx264\ | |
-stats\ | |
out.mp4 | |
# color |
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
#!/usr/bin/env bash | |
# setup: | |
# $ mkdir -p /tmp/s3 && cd /tmp/s3 | |
# $ ~/js/nexenta/nef/test.sh 2>&1 | grep --color -E "^\+.+$|$" | |
set -x; | |
#set -e; | |
HOST="1.1.1.1:9000" |
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
#!/usr/bin/env bash | |
# setup: | |
# $ mkdir -p /tmp/s3 && cd /tmp/s3 | |
# $ ~/js/nexenta/nef.extra/mc/test.sh 2>&1 | grep --color -E "^\+.+$|$" | |
set -x; | |
#set -e; | |
HOST="1.1.1.1:9000" |
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
diff --git a/mint/mint.sh b/mint/mint.sh | |
index 5d9e997..952dc16 100755 | |
--- a/mint/mint.sh | |
+++ b/mint/mint.sh | |
@@ -139,6 +139,7 @@ function main() | |
export ENABLE_VIRTUAL_STYLE | |
export GO111MODULE | |
export GOPROXY | |
+ export BAIL | |
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
# by defailt mint tests fail on the first failed test case, to change it follow these steps: | |
git clone [email protected]:minio/minio.git | |
cd minio/mint | |
vim mint.sh +194 # comment "break" on string 194 to run all the tests and don't stop on the first fail | |
docker build --no-cache -t minio/mint:local . -f Dockerfile.dev | |
docker run \ | |
--name mint \ | |
--rm \ | |
-it \ | |
-e SERVER_ENDPOINT=10.3.199.254:9000 \ |
NewerOlder