Skip to content

Instantly share code, notes, and snippets.

@bestimmaa
bestimmaa / AutoHotkey.ahk
Last active August 29, 2015 14:06
AutoHotkey Script for using Apple Keyboard on Windows
LAlt::RAlt
RAlt::LAlt
LWin::LControl
#! /bin/sh
# ------------------------------------------------------------------------------
# SOME INFOS : fairly standard (debian) init script.
# Note that node doesn't create a PID file (hence --make-pidfile)
# has to be run in the background (hence --background)
# and NOT as root (hence --chuid)
#
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts
# INSTALL/REMOVE http://www.debian-administration.org/articles/28
@bestimmaa
bestimmaa / random.c
Last active December 31, 2015 14:49 — forked from hfadev/random.c
Generating a random float between 0 and 1
//set seed
srand(time(NULL));
// random number in range [0,1]
float r = (float)rand()/RAND_MAX;
printf("%f\n", r);
@bestimmaa
bestimmaa / opencv_qt.pro
Created October 17, 2013 22:29
Import OpenCV in Qt Creator project
#-------------------------------------------------
#
# Add OpenCV to QT Creator on Mac OS X
#
# This pro file assumes that opencv was installed
# by homebrew or manually in /usr/local/
#
#-------------------------------------------------
QT += core gui
@bestimmaa
bestimmaa / freeimage make
Last active December 24, 2015 05:49
FreeImage makefile for Mac OS X 10.8
# -*- Makefile -*-
# Mac OSX makefile for FreeImage
# This file can be generated by ./gensrclist.sh
include Makefile.srcs
# General configuration variables:
CC_X86_64 = gcc -4.2
CPP_X86_64 = g++ -4.2
COMPILERFLAGS = -Os -fexceptions -fvisibility=hidden -DNO_LCMS