Skip to content

Instantly share code, notes, and snippets.

View reasonset's full-sized avatar

MASAKI Haruka reasonset

View GitHub Profile
#!/usr/bin/zsh
# $1 => Original Image
setopt extended_glob
infile="$1"
name="$2"
identify "$infile"
if [[ $(identify "$infile") == *" "(#b)(<->)x(<->)" "* ]]
then
@reasonset
reasonset / gem-cowon-m2-playlist.zsh
Created February 13, 2016 13:50
Convert SMplayer(Linux)'s playlist to COWON M2 media player's playlist.
#!/usr/bin/zsh
playlist_file="$1"
shift
perl -p -e 's:/:\\:g;' -e 'print "\\" if m/^[^\s#]/;' "$playlist_file" >| ${playlist_file:s/-utf8.m3u/.m3u}
mv -v "$playlist_file" ~/local/cowon-m2/playlists/