Skip to content

Instantly share code, notes, and snippets.

@gurdiga
gurdiga / minify-js.sh
Created November 25, 2012 13:34
JS minifying script with curl and Closure Compiler REST API
#!/bin/sh
# Use like this:
#
# minify-js.sh < app.js > app.min.js
#
curl -s \
-d compilation_level=SIMPLE_OPTIMIZATIONS \
-d output_format=text \
@gurdiga
gurdiga / gist:2411479
Created April 18, 2012 06:34
Skype start on Debian
bash -c 'LD_PRELOAD=/usr/lib32/libv4l/v4l2convert.so ~/skype_static-2.2.0.35/skype'
@gurdiga
gurdiga / gist:2356487
Created April 11, 2012 02:37
batch transcode with vlc
for file in *.mkv; do out=`basename "$file" .mkv`.mp4; cvlc "$file" :sout="#transcode{vcodec=h264,scale=0.5}:std{access=file,mux=ps,dst='$out'}" vlc://quit; done
@gurdiga
gurdiga / gist:2155982
Created March 22, 2012 04:36
sed css minification
sed \
-e ':a;N;$!ba;s/\n//g' \
-e 's/ {/{/g' \
-e 's/: /:/g' \
-e 's/;}/}/g' \
-e 's/{ /{/g' \
-e 's/; /;/g' \
css/style.css