Skip to content

Instantly share code, notes, and snippets.

View rriemann's full-sized avatar

Robert Riemann rriemann

View GitHub Profile
@rriemann
rriemann / gist:7214543
Created October 29, 2013 13:22
use convert from Imagemagick to compress black/white scans to 2bit tiff files
convert Image-0001.png Image-0002.png -depth 2 -colorspace Gray output.tiff
#!/bin/bash
## Install Gitlab 5.2 on OpenSUSE 12.3 32Bits
## Project http://gitlab.org/
## Base https://github.com/gitlabhq/gitlabhq/blob/5-0-stable/doc/install/installation.md
## Autor: Nilton OS -- Version 0.9 14-06-2013 -- http://wwww.linuxpro.com.br/blog
## Change Vars !!!
SERVER_IP="10.0.2.15"
SERVER_FQDN="gitlab.linuxpro.com.br"
DOMIAN="linuxpro.com.br"
@rriemann
rriemann / booklet.sh
Created October 9, 2013 12:43
use pdfjam to create a nice A5 booklet
/usr/bin/pdfjam --landscape --suffix book --a4paper --trim '1cm 1cm 1cm 1cm' --clip 'true' --signature '32' -- input.pdf -
@rriemann
rriemann / create_gif.sh
Created April 17, 2013 14:33
Create an animated gif using ffmpeg, convert (imagemagick) and gifsicle
#!/usr/bin/env sh
rm out*.jpg
rm out*.gif
ffmpeg -y -i 13040065.mp4 -t 1 -filter:v transpose=1,scale=400:-1,deshake,crop=400:400 out%02d.jpg
for file in *.jpg; do
convert $file ${file%.*}.gif
done
gifsicle --delay=5 --colors 256 --loop out*.gif > final.gif
@rriemann
rriemann / screencast.sh
Created April 2, 2013 23:44
screencast
# http://kate-editor.org/2013/04/02/kate-search-replace-highlighting-in-kde-4-11/
ffmpeg -f x11grab -r 30 -s 1280×720 -i :0.0 -vcodec libx264 -preset ultrafast -qp 0 -threads 0 output.mkv
@rriemann
rriemann / git-remove.sh
Created March 18, 2013 13:50
Remove files entirely from git repo
#!/bin/bash
# http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/
# https://help.github.com/articles/remove-sensitive-data
set -o errexit
# Author: David Underhill
# Script to permanently delete files/folders from your git repository. To use
# it, cd to your repository's root and then run the script with a list of paths
@rriemann
rriemann / INSTALL.md
Last active December 10, 2017 17:12
Howto install Gitlab on top of opensuse 12.3 32bit

Please read everything before starting!

Install OS

  • Download OpenSUSE 12.3 32bit, Network edition http://download.opensuse.org/distribution/12.3/iso/openSUSE-12.3-NET-i586.iso
  • I chose 32bit, because Ruby Binary Extensions might have problems with lib64 path structure. We workaround this bug.
  • I chose networkinstall, because we need only very few packages and don't need to download everything. only 200MB are downloaded during install
  • the image can easily copied to a usb pen drive using the gui tool "imagewriter" (executed as root)
  • Partition: There are 2 big hard drives. I created on both of them first a primary pratition of 1GB of type LINUX-RAID
@rriemann
rriemann / INSTALL.md
Last active December 14, 2015 00:08
How-To Setup Mayavi2 on opensuse 12.2

Notes on Installing Mayavi2 on opensuse 12.2 or 12.1

  • Mayavi: http://code.enthought.com/projects/mayavi/

  • Add python repo:

    zypper ar http://download.opensuse.org/repositories/devel:/languages:/python/openSUSE_12.2/devel:languages:python.repo
  • Install Dependencies:

@rriemann
rriemann / gist:3555868
Created August 31, 2012 17:01
convert audio with ffmpeg
for f in *.ape; ffmpeg -i $f $f:r.flac
@rriemann
rriemann / gist:3066809
Created July 7, 2012 15:04 — forked from anonymous/gist:729557
64-bit unsigned integer cube root
#include <stdio.h>
typedef unsigned int U32;
typedef unsigned __int64 U64;
// ---- actual cube root code
U32 icbrt64(U64 x) {
int s;
U32 y;