This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo Building Google Protobuf for Mac OS X / iOS. | |
echo Use 'tail -f build.log' to monitor progress. | |
( | |
#PREFIX=`pwd`/protobuf | |
PREFIX=/opt/protobuf-ios | |
mkdir ${PREFIX} | |
mkdir ${PREFIX}/platform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Deploying Qt/QML Applications | |
------- | |
A good blog post can be found here: | |
http://lemirep.wordpress.com/2013/06/01/deploying-qt-applications-on-linux-and-windows-3/comment-page-1/ | |
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
HOST=linux-x64 | |
lynx -dump -listonly http://download.qt-project.org/official_releases/online_installers/ | grep "\<http:.*$HOST.*online.run\>" -oh | tail -n 1 | xargs wget | |
chmod +x qt*$HOST*run | |
./qt*$HOST*run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo sh -c "echo '# Machinekit package archive tracking the master branch\n# From the Dovetail Automata LLC Buildbot\ndeb http://deb.dovetail-automata.com wheezy main\ndeb-src http://deb.dovetail-automata.com wheezy main' >> /etc/apt/sources.list.d/machinekit.list" | |
sudo sh -c "echo '# Machinekit needs a recent cython from wheezy-backports:\ndeb http://ftp.us.debian.org/debian 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Setup flymake for Python | |
(when (load "flymake" t) | |
(defun flymake-pylint-init () | |
(let* ((temp-file (flymake-init-create-temp-buffer-copy | |
'flymake-create-temp-inplace)) | |
(local-file (file-relative-name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
import os | |
import subprocess | |
import importlib | |
from machinekit import launcher | |
from time import * | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo Building Google Protobuf for Mac OS X / iOS. | |
echo Use 'tail -f build.log' to monitor progress. | |
( | |
VERSION=2.6.1 | |
DARWIN_RELEASE=`uname -r` | |
CORES=`sysctl hw.ncpu | awk '{print $2}'` | |
#PREFIX=`pwd`/protobuf |
OlderNewer