Skip to content

Instantly share code, notes, and snippets.

View rriemann's full-sized avatar

Robert Riemann rriemann

View GitHub Profile
@rriemann
rriemann / pdfmerge.rb
Created January 12, 2012 12:40
merge pdf files using ghostscript
#!/usr/bin/env ruby
if ARGV.first == "--help"
puts <<-EOF
usage: pdfmerge.rb SUMMARYFILE FILE1 FILE2 ...
All Files have to be pdf-Files. Requires GhostScript (gs).
Copyright 2009 Robert Riemann - licensed under GPL v2 or higher.
EOF
exit
end
@rriemann
rriemann / cpp_add_full_header_path.rb
Created January 26, 2012 16:11
Help correcting header includes in c++ projects
#!/usr/bin/env ruby
require 'optparse'
require 'pathname'
options = {:root => './'}
optparse = OptionParser.new do |opts|
opts.on('-r', '--root PATH', 'Source Code Root') do |path|
options[:root] = path
@rriemann
rriemann / fig2pdf.sh
Created January 30, 2012 12:57
convert Xfig Images to pdf using a bash/zsh script
fig2pdf() {
for file in "$@"; do
fig2dev -L pstex -s10 $file > ${file%.*}.eps
epstopdf ${file%.*}.eps
rm ${file%.*}.eps
done
}
@rriemann
rriemann / client.sh
Created February 3, 2012 10:13
rsync mirror opensuse repo
#!/bin/sh
zypper ar --check --no-keep-packages --no-gpgcheck --type rpm-md --name fritzbox-12.1-update nfs://fritz.box:/var/media/ftp/uStor02/opensuse/update/12.1?mountoptions=vers=3 fritzbox-12.1-update
zypper ar --check --no-keep-packages --no-gpgcheck --type rpm-md --name fritzbox-12.1-kde48 nfs://fritz.box:/var/media/ftp/uStor02/opensuse/repositories/KDE:/Release:/48/openSUSE_12.1?mountoptions=vers=3 fritzbox-12.1-kde48
zypper ar --check --no-keep-packages --no-gpgcheck --type rpm-md --name fritzbox-12.1-packman nfs://fritz.box:/var/media/ftp/uStor02/opensuse/repositories/packman/12.1/Essentials?mountoptions=vers=3 fritzbox-12.1-packman
zypper mr -p 90 fritzbox-12.1-update
zypper mr -p 90 fritzbox-12.1-kde48
zypper mr -p 90 fritzbox-12.1-packman
@rriemann
rriemann / gist:1869181
Created February 20, 2012 13:25
installing picard from source
## infos
zypper in libffmpeg-devel libofa0-devel
## build.cfg
[directshow]
libs =
cflags =
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
@rriemann
rriemann / rb-gsl.patch
Created April 3, 2012 23:15 — forked from kovyrin/rb-gsl.patch
Fix for "matrix_complex.c:1525: error: conflicting types for ‘gsl_matrix_complex_equal’"
diff --git a/ext/matrix_complex.c b/ext/matrix_complex.c
index 8a77ac1..1b1d8af 100644
--- a/ext/matrix_complex.c
+++ b/ext/matrix_complex.c
@@ -1519,8 +1519,7 @@ static VALUE rb_gsl_matrix_complex_indgen_singleton(int argc, VALUE *argv, VALUE
return Data_Wrap_Struct(cgsl_matrix_complex, 0, gsl_matrix_complex_free, mnew);
}
-
-static int gsl_matrix_complex_equal(const gsl_matrix_complex *m1,
@rriemann
rriemann / share.css
Created May 21, 2012 23:55 — forked from Mononofu/share.css
socialshareprivacy inline, without jQuery
.social_share_privacy_area {
clear: both;
margin: 20px 0 !important;
list-style-type: none;
padding: 0 !important;
width: auto;
height: 25px;
display: block;
}
.social_share_privacy_area li {
@rriemann
rriemann / gallery.html
Created May 30, 2012 13:26
Parallel shell loop using prll
@rriemann
rriemann / 20g15daemon.sh
Created June 18, 2012 10:38
handle suspend for g15daemon
#!/bin/sh
#/usr/lib/pm-utils/sleep.d/20g15daemon
. "${PM_FUNCTIONS}"
case "$1" in
hibernate|suspend)
printf 'G15 daemon will be stopped now...'
/etc/init.d/g15daemon stop
;;
thaw|resume)