Skip to content

Instantly share code, notes, and snippets.

@ralfstx
ralfstx / escapecolors.sh
Created September 14, 2011 15:23
Script that prints an overview of escape sequences for changing colors
#!/bin/bash
#
# This script prints an overview of the escape sequences for changing the
# terminal text and background colors using escape sequences.
name030="Black "
name130="Gray "
name031="Red "
name131="Light Red "
name032="Green "
@ralfstx
ralfstx / check-copyright.sh
Created May 30, 2012 16:31
Checks the year in copyright headers in RAP
@ralfstx
ralfstx / comp-repo.sh
Created June 8, 2012 10:16
Tool to maintain p2 composite repositories
#!/bin/bash
#
# Tool to maintain p2 composite repositories
USAGE="Usage:
`basename "$0"` <repo-dir> [options] operation, operation ...
Options:
--name <repo name>
the repository name
--eclipse <eclipse install dir>
@ralfstx
ralfstx / fullscreen
Created June 8, 2012 13:32
A shell script to set windows to fullscreen
#!/bin/bash
mode=
window=
usage() {
echo "Usage: $0 [on|off|toggle] [window]"
echo " default is to toggle fullscreen mode"
echo " window is a string contained in the window's title"
exit
@ralfstx
ralfstx / bless.sh
Created June 18, 2012 20:42
Tool to turn eclipse directories into p2 repositories
#!/bin/bash
#
# Tool to turn eclipse directories into p2 repositories
USAGE="Usage:
`basename "$0"` <repo-dir> [options]
Options:
--name <repo name>
the repository name
--eclipse <eclipse install dir>
@ralfstx
ralfstx / UITestPhaseListener.java
Created June 16, 2013 11:41
A phase listener for RAP to create additional DOM attributes for UI tests.
/*******************************************************************************
* Copyright (c) 2013 EclipseSource.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ralf Sternberg - initial API and implementation
******************************************************************************/
@ralfstx
ralfstx / ArrayVsListBenchmark
Created April 14, 2014 12:07
ArrayVsListBenchmark
/*******************************************************************************
* Copyright (c) 2014 EclipseSource.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ralf Sternberg - initial implementation and API
******************************************************************************/
@ralfstx
ralfstx / Picker_1.js
Created May 3, 2017 11:02
Tabris 1.x compatible Picker
const tabris = require('tabris');
/**
* Tabris 1.x compatible Picker
* Does not include compatibility for events
*/
class Picker_1 extends tabris.Picker {
constructor(properties) {
super(Object.assign({
@ralfstx
ralfstx / CollectionView_1.js
Created May 3, 2017 11:03
Tabris 1.x compatible CollectionView
const tabris = require('tabris');
/**
* Tabris 1.x compatible CollectionView
* Does not include compatibility for events
*/
class CollectionView_1 extends tabris.CollectionView {
constructor(properties) {
super(properties);
@ralfstx
ralfstx / README.md
Created May 10, 2020 10:48
Cross-compiling for ARM with musl

Cross-compiling for ARM with musl

I'm using the target arm-linux-musleabihf for ARM v6 (Raspberry Zero is v6) with musl and hard float.

Build a cross compiler

Following instructions from Rust (and C) Cross Compilation for the Raspberry Pi.

Create an output directory: