Skip to content

Instantly share code, notes, and snippets.

@hG3n
hG3n / addfiles.py
Last active August 29, 2015 14:16
script to add argument files and commt them with a specific message
#!/usr/bin/env python
import sys
import os
from subprocess import call
# get arguments to array
args = sys.argv
args.pop(0);
# get list of files in directories
@hG3n
hG3n / .zshrc
Created March 5, 2015 13:12
zshrc
# ---------------------------- #
# --- GENERAL ZSH SETTINGS --- #
# ---------------------------- #
ZSH=$HOME/.zsh # Path to zsh_cfg.sh
ZSH_THEME="hGen" # chosen theme
source $ZSH/zsh_cfg.sh # laod zsh config file
# path settings
@hG3n
hG3n / pyscan-wifi
Created April 10, 2015 20:28
OSX Wifi Terminal Tool
#!/usr/bin/env python
import sys
import subprocess
import urwid
def filterNames(string):
temp = string.lstrip().split(' ')
return temp[0]
def getAvailableNetworks():
@hG3n
hG3n / .zshrc
Created April 21, 2015 12:22
zshrc
# ---------------------------- #
# --- GENERAL ZSH SETTINGS --- #
# ---------------------------- #
ZSH=$HOME/.zsh # Path to zsh_cfg.sh
ZSH_THEME="hGen" # chosen theme
source $ZSH/zsh_cfg.sh # laod zsh config file
# path settings
@hG3n
hG3n / assignment.sty
Created May 11, 2015 14:16
latex config for assignment
%!TEX encoding = UTF-8 Unicode
\documentclass[a4paper,parskip,DIV15]{scrartcl}
\usepackage[utf8]{inputenc}
% \usepackage[utf8x]{inputenc}
\usepackage[ngerman]{babel}
% pretty fonts
\usepackage[T1]{fontenc}
\usepackage[defaultsans, scale=0.9]{lato}
@hG3n
hG3n / Default.sublime-theme
Created June 20, 2015 15:21
slightly adjusted Default Theme for Sublime-Text, features dark sidebar and filebrowser
[
{
"class": "label_control",
"color": [255, 255, 255],
"shadow_color": [24, 24, 24],
"shadow_offset": [0, -1]
},
{
"class": "button_control",
"content_margin": [6, 5, 6, 6],
@hG3n
hG3n / matType2str.cpp
Created June 27, 2015 17:49
function to print the type of a matrix by passing Mat.type() as argument
std::string type2str(int type) {
std::string r;
uchar depth = type & CV_MAT_DEPTH_MASK;
uchar chans = 1 + (type >> CV_CN_SHIFT);
switch ( depth ) {
case CV_8U: r = "8U"; break;
case CV_8S: r = "8S"; break;
case CV_16U: r = "16U"; break;
@hG3n
hG3n / convertCoord1d2d.cpp
Created September 1, 2015 16:50
two little functions converting either 2d into 1d or 1d into 2d coordinates
cv::Point index2Coord(int index)
{
int x = index % width;
int y = index / width;
return cv::Point(x,y);
}
int coord2Index(int x, int y)
{
return x + width*y;
@hG3n
hG3n / rights
Created October 11, 2015 11:18
short reminder on how to make shell applications run without explicitly using sudo
chmod 6555 $application
sudo chown root $application
@hG3n
hG3n / structure.txt
Last active October 20, 2015 18:41
bachelor thesis structure
Echtzeit Hinderniserkennung für unbemannte Flugsysteme unter Benutzung eines Stereo Kamera Systems
1. Einführung
1.1 Motivation
1.2 Setup
1.3 Ziel der Arbeit
2. Anforderungsanalyse
2.1 Bildaufnahme und Preprocessing
2.2 Erfassung von Hindernissen