Skip to content

Instantly share code, notes, and snippets.

I'm probably coding.

Alexander Rössler machinekoder

I'm probably coding.
View GitHub Profile
echo Building Google Protobuf for Mac OS X / iOS.
echo Use 'tail -f build.log' to monitor progress.
mkdir ${PREFIX}
mkdir ${PREFIX}/platform
machinekoder / qt-qml-deploy-note
Last active Aug 29, 2015
Deploying Qt/QML Applications
View qt-qml-deploy-note
Deploying Qt/QML Applications
A good blog post can be found here:
For Linux note that the run script should use /bin/bash to work properly on Ubuntu. Older distributions may also need libc and gcc libraries deployed.
On Mac OSX deploying applications is really easy using the macdeployment tool. Don't forget to tell it the qml dir.
machinekoder /
Created Apr 19, 2014
Post processing script for Slic3r to work with Machinekit
# convert all E to A axis
sed '/^G/s/ E/ A/' "$1" > "$1post"
rm "$1"
# convert all M106 to B axis
sed '/^M106/s/M106 P/G0 B/' "$1post" > "$1"
rm "$1post"
machinekoder /
Created May 1, 2014
Download and start latest Qt SDK online installer
lynx -dump -listonly | grep "\<http:.*$HOST.*\>" -oh | tail -n 1 | xargs wget
chmod +x qt*$HOST*run
machinekoder /
Last active Aug 29, 2015
Installks the latest Machinekit Machinetalk previe on Debina wheezy
sudo sh -c "echo '# Machinekit package archive tracking the master branch\n# From the Dovetail Automata LLC Buildbot\ndeb wheezy main\ndeb-src wheezy main' >> /etc/apt/sources.list.d/machinekit.list"
sudo sh -c "echo '# Machinekit needs a recent cython from wheezy-backports:\ndeb wheezy-backports main' >> /etc/apt/sources.list.d/wheezy-backports.list"
sudo sed -i '/cdrom/d' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install automake1.11 libtool liburiparser-dev libssl-dev openssl python-setuptools libusb-1.0-0-dev libudev-dev uuid-dev uuid-runtime libavahi-client-dev libavahi-compat-libdnssd-dev avahi-daemon libprotobuf-dev protobuf-compiler python-protobuf libprotoc-dev uuid-runtime python-avahi python-netifaces libxenomai-dev
sudo apt-get install libmodbus-dev libsodium-dev libzmq4-dev libczmq-dev libjansson-dev libwebsockets-dev python-zmq liburiparser-dev
sudo apt-get install -t
machinekoder / coding_style.el
Last active Aug 29, 2015
pycheckers for Emacs
View coding_style.el
;; Setup flymake for Python
(when (load "flymake" t)
(defun flymake-pylint-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
(local-file (file-relative-name
machinekoder /
Created Apr 30, 2015 for axis config
import sys
import os
import subprocess
import importlib
from machinekit import launcher
from time import *
View hal-mode.el
(require 'generic-x)
(define-generic-mode hal-generic-mode
(apply 'append
(mapcar #'(lambda (s) (list (upcase s) (downcase s) (capitalize s)))
'("loadrt" "loadusr" "addf" "setp" "sets" "start"
"newpin" "newcomp" "sete"
"newg" "newsig" "ready" "net" "log")))
'(;;("\\(#<_?[A-Za-z0-9_]+>\\)" (1 font-lock-type-face))
machinekoder / cos_test.c
Created May 10, 2015
Quick test for timing behavior of cos C function
View cos_test.c
/* Program to demonstrate time taken by function cos() */
#include <stdio.h>
#include <time.h>
#include <math.h>
// The main program calls fun() and measures time taken by fun()
int main()
// Calculate the time taken by fun()
clock_t start;
machinekoder /
Last active Apr 6, 2016
Install QtQuickVcp on fresh Debian Wheezy
sudo sh -c \
"echo 'deb wheezy main' > \
/etc/apt/sources.list.d/machinekit.list; \
apt-get update ; \
apt-get install dovetail-automata-keyring"
sudo apt-get update
sudo apt-get install -y build-essential gdb subversion dh-autoreconf libgl1-mesa-dev lynx pkg-config dovetail-automata-keyring python-protobuf libprotobuf-dev protobuf-compiler libnotify-bin libczmq-dev python-zmq libzmq4-dev
mkdir -p ~/bin/Qt
You can’t perform that action at this time.