Skip to content

Instantly share code, notes, and snippets.

View mkalygin's full-sized avatar

Michael Kalygin mkalygin

View GitHub Profile
@mkalygin
mkalygin / tinypng
Created September 13, 2018 10:36
This simple batch script compresses PNG and JPEG files with TinyPNG API https://tinypng.com. It depends on jq tool https://stedolan.github.io/jq/.
# Usage:
# ./tinypng <path> <path> ...
#
# Upload the files to shrink and then save them locally under the same name.
# Only works with JPEG and PNG. Accepts wildcard path for batch compression.
#
# Uses TinyPNG API: https://tinypng.com/developers/reference.
# Uses TINYPNG_API_KEY environment variable for TinyPNG API key.
# Depends on jq: https://stedolan.github.io/jq/
@mkalygin
mkalygin / install-zsh.sh
Created May 2, 2014 16:20
Install zsh on Elementary OS.
# Source: http://choyan.me/oh-my-zsh-elementaryos/
sudo apt-get update && sudo apt-get install -y curl vim git zsh
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | bash
sudo chsh -s $(which zsh) $(whoami)