Skip to content

Instantly share code, notes, and snippets.

View merdmann's full-sized avatar
🏠
Working from Berlin

Michael Erdmann merdmann

🏠
Working from Berlin
View GitHub Profile
@merdmann
merdmann / organizer.js
Created June 22, 2017 14:13
Organize Table by
function Organizer (keyname) {
this.keyname = keyname;
this.data = [];
this.result = [];
}
Organizer.prototype.add = function (item) {
this.data.push(item);
}
@merdmann
merdmann / muon.service
Created January 5, 2016 11:08
This is the defintion of a service on the beaglebone.
[Unit]
Description=Read the Muon Detector
After=syslog.target network.target
[Service]
Type=simple
ExecStart=/home/root/muon/offline.sh --root=/home/root/muon
[Install]
WantedBy=multi-user.target
@merdmann
merdmann / arm-none-eabi.txt
Created December 29, 2015 08:15
arm-none-eabi.txt
#
# Toolchain file for GNU GCC tools
#
include(CMakeForceCompiler)
SET(CMAKE_SYSTEM_NAME Generic)
SET(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR stm32)
set(CMAKE_SYSTEM_NAME Generic)
@merdmann
merdmann / tasks.jason
Created August 8, 2015 17:33
Visual Studio Code: GNU GCC configurtion files
{
"version": "0.1.0",
"command": "make",
"showOutput": "silent",
"tasks": [
{
"taskName": "all",
"isBuildCommand": true,
"showOutput": "silent",
"problemMatcher": {
@merdmann
merdmann / gist:9d563f9cee817b8bd689
Created November 30, 2014 18:46
Google Apps Script for "Planing Poker" Response Page
/**
* Make the moderator sheet active
*/
function gotoModeratorSheet() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName("Moderator Page")
ss.setActiveSheet(sheet)
}
@merdmann
merdmann / MyTestListener.cpp
Last active August 29, 2015 14:08
My TestListener for igloo
/*
* MyTestListener.cpp
*
* THis ist the main test runner. It produces at the end a nicely formatted report.
*
* Created on: Oct 27, 2014
* Author: MIchael
*/
#include <iomanip>
#include <fstream>
@merdmann
merdmann / form.html
Last active August 29, 2015 13:56
This fragment allows to collect some input on a html page and the send the data to an google apps scrip for processing.
<p>If you want to drop me a message use the form below.</p>
<!-- put there the url you get from google script when activating it -->
<form action="https://script.google.com/macros/..................../exec" method="POST">
<table>
<tbody>
<tr>
<td>Name or email Address :</td>
<td><input name="name" size="20" type="text" value="" /></td>
</tr>
<tr>
@merdmann
merdmann / alicante.setup
Created January 9, 2014 15:39
A script to configure torque dispatch jobs into different queues. Clean up all queues that there are no waiting jobs any more (qdel -p ..) and run in the configuration: $ qmgr < alicante.setup To submit a large job just type: $ qsub large.sh
#set server managers += merdmann@*
delete queue small
delete queue large
delete queue default
# routing queue
create queue default
set queue default queue_type = Route
@merdmann
merdmann / wwn.sh
Last active January 2, 2016 11:19
Script to find out the wwn of one or more fibre channel HBA
#!/bin/bash
if [ -d "/sys/class/fc_host" ] ; then
cd /sys/class/fc_host
ls -w1 | while read i ; do
if [ -f "$i/port_name" ] ; then
echo -n "wwn: "
cat $i/port_name
fi
done
elif [ -d "/proc/scsi/qla2xxx" ] ; then
@merdmann
merdmann / Makefile
Created December 24, 2013 07:52
This small piece of code i am using the evaluate the performance of a coro sync based cluster. Start the the compiled program on all nodes except for one without any arguments. On the last node call the program with an argument; e.g. ./app 1.
CC=gcc
RM=rm -rf
bin=./bin
src=./src
exec=$(bin)/app
all : dirs $(exec)