Skip to content

Instantly share code, notes, and snippets.

View dymio's full-sized avatar

Ivan Dymkov dymio

View GitHub Profile
@dymio
dymio / image_magick_hints
Created November 27, 2014 09:30
Image Magick Hints
#!/bin/bash
# convert all .png in curent folder to .jpg with white background and resizing
find . -name "*.png" -exec convert {} -resize 1046x -background white -flatten {}.jpg \;
@dymio
dymio / Simplest ssh deploy
Created August 5, 2014 14:35
The simplest deploy shell script - just run git pull on the remote server by ssh
#!/bin/sh
echo "--- Begin deploy process ---"
echo "Running remote command 'cd ~/www/project; git pull'"
ssh [email protected] 'cd ~/www/project; git pull'
echo "--- Deploy complete ---"
#!/bin/sh
# Imagemagick analogue of Adobe Photoshop Gradient map with 75% opacity on it
# you will need the input.jpg file with original color image
# and gradient_line.png file with 256 x 1 px image of gradient
# make image grayscale
convert input.jpg -colorspace gray draft.jpg
# apply the gradient lut