Skip to content

Instantly share code, notes, and snippets.

View alexander-heimbuch's full-sized avatar
🤔

Alexander Heimbuch alexander-heimbuch

🤔
View GitHub Profile
<style>
[for="registration_user_invite_request_attributes_text"] {
overflow: hidden;
height: 0;
padding-top: 50px !important;
}
[for="registration_user_invite_request_attributes_text"]:before {
position: absolute;
display: block;
@alexander-heimbuch
alexander-heimbuch / 00_intro.md
Last active August 29, 2018 18:16
iOS Development Reading List - 2018

Intro

I try to learn every year a new programming language, just to see how things work in different environments. I have an advanced web development background and try to find my way into iOS development. Each Lesson I take or library I used will be part of this gist, maybe this will result also in a blog post :)

@alexander-heimbuch
alexander-heimbuch / lib.js
Created December 23, 2017 06:46
Redux Webworker Middleware
import { get } from 'lodash'
export const connectToWorker = Worker => {
const worker = new Worker()
let registered = false
return (store, action) => {
const state = store.getState()
if (!registered) {
@alexander-heimbuch
alexander-heimbuch / test.sh
Created July 29, 2016 06:47
Docker IO mount test
docker run --rm -v $(pwd):/test ubuntu:latest bash -c "dd if=/dev/zero of=/test/testfile bs=1G count=1 && rm test/testfile"
@alexander-heimbuch
alexander-heimbuch / ocr.sh
Last active November 26, 2018 06:22
cli tool for inline pdf ocr on mac osx
#!/bin/bash
# ocr.sh for Mac OSX 10.11
# works in memory (~/.ocr-TIMESTAMP)
# needs pdftk, pdftoppm, tesseract-ocr
# Port from multithreaded OCR with tesseract 3.03/3.04 (Michael Luthardt <edv@dr-luthardt.de> 2016, https://dr-luthardt.de/linux.htm?tip=pdfx)
# PREREQUISITES (requires homebrew)
# 1 - tesseract: brew install tesseract --with-all-languages (all languages will take up to 1.2gb space, see https://github.com/tesseract-ocr/tesseract/wiki to install ony selective)
# 2 - pdftk: https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg
# 3 - pdftotext, pdftoppm: brew install poppler
cat << "EOF"
______ ____ ___ __
/\ _ \ __ /\ _`\ /\_ \ /\ \
\ \ \L\ \/\_\ _ __\ \ \L\ \//\ \ __ __ __\ \ \
\ \ __ \/\ \/\`'__\ \ ,__/ \ \ \ /'__`\ /\ \/\ \\ \ \
\ \ \/\ \ \ \ \ \/ \ \ \/ \_\ \_/\ \L\.\_\ \ \_\ \\ \_\
\ \_\ \_\ \_\ \_\ \ \_\ /\____\ \__/.\_\\/`____ \\/\_\
\/_/\/_/\/_/\/_/ \/_/ \/____/\/__/\/_/ `/___/> \\/_/
/\___/
\/__/
#!/bin/sh
unzip -qq instantclient-sqlplus-macos.x64-11.2.0.4.0.zip
unzip -qq instantclient-basic-macos.x64-11.2.0.4.0.zip
cd instantclient_11_2
mkdir -p /Applications/oracle/product/instantclient_64/11.2.0.4.0/bin
mkdir -p /Applications/oracle/product/instantclient_64/11.2.0.4.0/lib
mkdir -p /Applications/oracle/product/instantclient_64/11.2.0.4.0/jdbc/lib
mkdir -p /Applications/oracle/product/instantclient_64/11.2.0.4.0/rdbms/jlib
mkdir -p /Applications/oracle/product/instantclient_64/11.2.0.4.0/sqlplus/admin
@alexander-heimbuch
alexander-heimbuch / object2array.js
Created December 23, 2015 09:46
Convert Array like Object to Array
/*
* Convert Array like Object to Array
* Source: http://xahlee.info/js/js_convert_array-like.html
*/
Object.prototype.toArray = function () {
return Array.prototype.slice.call(this);
}
// {0:"a", 1:"b",2:"c", length:3}.toArray() => ['a', 'b', 'c']
@alexander-heimbuch
alexander-heimbuch / jquery.min.js
Last active December 23, 2015 10:35
Minimal jQuery Replacement
/**
* Minimal jQuery replacement
*/
(function () {
'use strict';
var find = function (element) {
return function (query) {
var results = element.querySelectorAll(query),
@alexander-heimbuch
alexander-heimbuch / webdev-boilerplate.sh
Last active December 18, 2015 15:50
Script for running the webdev boilerplate
#!/bin/sh
project=${PWD##*/}
git clone https://github.com/alexander-heimbuch/webdev-boilerplate.git .
rm -rf .git && \
sed -i '' "s/project-name/$project/g" package.json && \
npm i