Skip to content

Instantly share code, notes, and snippets.

@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
@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: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 / 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 \
#sslock, #ab_ctl_ss {
display: none;
}
@gurdiga
gurdiga / assembla.com.css
Created April 18, 2013 01:57
Personalized Web Options ^https://.*.assembla.com/
.ticket-description, .message-content,
.ticket-comments .comment, #new_flow_body {
width: 42em;
}
.commit-comment-header span {
display: block;
}
table#projectstatus {
width: auto;
margin: 1em 4px !important;
border-top: 1px #bbb solid!important;
}
table#projectstatus+table {
display: none;
}
@gurdiga
gurdiga / 999.md.css
Last active December 16, 2015 08:58
Personalized Web Options
.a0e7c1ec9e018,
.header_numbersTop,
.banner,
#header_numbersRich,
#m__numbers-placeholder-vertical,
#m__numbers-placeholder-rich,
#m__directadvert-horizontal,
#m__directadvert-vertical,
iframe {
display: none !important;
@gurdiga
gurdiga / sudval.org.css
Created April 18, 2013 02:00
Personalized Web Options ^http://.*.sudval.org
body {
width: 35em;
margin: 0 auto;
}
@gurdiga
gurdiga / github.com.css
Created April 18, 2013 02:01
Personalized Web Options ^https://github.com
@media print {
.pagehead, .frame-meta, .meta, #footer, .header {
display: none;
}
article.entry-content {
font-side: x-small;
}
}