Skip to content

Instantly share code, notes, and snippets.

View pvorb's full-sized avatar
🏠
Working from home

Paul Vorbach pvorb

🏠
Working from home
View GitHub Profile
// BASELINE INFORMATION
if (level == PageIteratorLevel::RIL_TEXTLINE) {
int x1, y1, x2, y2;
it->Baseline(level, &x1, &y1, &x2, &y2);
int p0;
float p1;
p0 = bottom - y1;
p1 = ((float) (y1 - y2)) / (x2 - x1);
int f_size;
@pvorb
pvorb / correct-box-coordinates.patch
Created April 19, 2014 09:45
Correct Box coordinates by adding a static_cast in Tesseract 3.03
Index: ccmain/pageiterator.cpp
===================================================================
--- ccmain/pageiterator.cpp (Revision 1058)
+++ ccmain/pageiterator.cpp (Arbeitskopie)
@@ -288,9 +288,9 @@
const int pix_height = pixGetHeight(tesseract_->pix_binary());
const int pix_width = pixGetWidth(tesseract_->pix_binary());
*left = ClipToRange(static_cast<int>(box.left()), 0, pix_width);
- *top = ClipToRange(pix_height - box.top(), 0, pix_height);
+ *top = ClipToRange(pix_height - static_cast<int>(box.top()), 0, pix_height);
@pvorb
pvorb / install.log
Created July 16, 2014 08:13
FontPro logs
cp: cannot stat `tex/*.sty': No such file or directory
cp: cannot stat `tex/*.cfg': No such file or directory
cp: cannot stat `tex/*.fd': No such file or directory
mktexlsr: Updating /cygdrive/e/Program Files/MiKTeX/ls-R...
mktexlsr: Done.
@pvorb
pvorb / notes.md
Created December 18, 2014 01:43 — forked from gangstead/notes.md

Typesafe webinar notes: Spray & Akka HTTP

Presenter - Mathias Doenitz

Spray.io

  • embeddable http stack built on Akka actors
  • Just an HTTP integration layer, not for building full web apps
  • Server & client side
<?php
/**
* This file grabs requested html files.
*
* @author Paul Vorbach <vorbach@genitis.org>
* @license http://opensource.org/licenses/mit-license.php MIT License
* @version 0.1.0
* @package org.genitis.yuki
*/
@pvorb
pvorb / vimrc
Created December 15, 2010 11:41
sample vimrc file
set nocompatible
syntax on
filetype plugin indent on
set autochdir
set backspace=indent,eol,start
set clipboard+=unnamed
set backupdir=~/.vim/backup
set directory=~/.vim/tmp
set fileformats=unix
@pvorb
pvorb / backup.sh
Created July 28, 2011 08:53
Backup script
#!/bin/bash
# Sichert die Dateien auf host
DIR="tmp"
if [ -d $DIR ]; then
cd $DIR
else
mkdir $DIR
cd $DIR
@pvorb
pvorb / split-germany.js
Created August 19, 2011 21:17
Split germany.osm into 20 handy chunks with Osmosis and Node.js
var n = 55.304138,
e = 15.380859,
s = 47.040182,
w = 4.394531;
var width = e - w,
height = n - s;
console.log("Width: " + width);
console.log("Height: " + height);
@pvorb
pvorb / mfc42ul_3.6.44.idc
Created November 3, 2011 00:27
Staatstrojaner
This file has been truncated, but you can view the full file.
//
// +-------------------------------------------------------------------------+
// | This file has been generated by The Interactive Disassembler (IDA) |
// | Copyright (c) 2011 Hex-Rays, <support@hex-rays.com> |
// | License info: 11-1111-1111-11 |
// | Bernd Zerlegt, The Internet |
// +-------------------------------------------------------------------------+
//
//
// This file should be used in the following way:
@pvorb
pvorb / time.js
Created March 21, 2012 02:11
Log the time on every second
setInterval(function () {
console.log(getTime(new Date()));
}, 1000);
function pad(n) {
return n < 10 ? '0'+n : n;
}
function getTime(dt) {
return pad(dt.getHours())+':'+pad(dt.getMinutes())+':'+pad(dt.getSeconds());