Skip to content

Instantly share code, notes, and snippets.

View elbosso's full-sized avatar

Jürgen Key elbosso

View GitHub Profile
/*
Juergen Key. Alle Rechte vorbehalten.
Weiterverbreitung und Verwendung in nichtkompilierter oder kompilierter Form,
mit oder ohne Veraenderung, sind unter den folgenden Bedingungen zulaessig:
1. Weiterverbreitete nichtkompilierte Exemplare muessen das obige Copyright,
die Liste der Bedingungen und den folgenden Haftungsausschluss im Quelltext
enthalten.
2. Weiterverbreitete kompilierte Exemplare muessen das obige Copyright,
@elbosso
elbosso / stats.py
Created October 28, 2018 13:16
A small python script for updating a small oled display with some stats (heavily influenced from Adafruits samples)
#!/usr/bin/python
# Copyright (c) 2017 Adafruit Industries
# Author: Tony DiCola & James DeVito
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
<!doctype html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://openlayers.org/en/v4.1.1/css/ol.css" type="text/css">
<style>
.map {
height: 100%;
width: 100%;
}
</style>
CONTAINERNAME=hillshading
PROCESSORCOUNT=$(cat /proc/cpuinfo | grep processor | wc -l) # used to speed up make
lxc-create -n $CONTAINERNAME -t download -- --arch amd64 --dist ubuntu --release xenial
lxc-start -n $CONTAINERNAME
lxc-attach -n $CONTAINERNAME -- apt-get update
lxc-attach -n $CONTAINERNAME -- apt-get -y upgrade
lxc-attach -n $CONTAINERNAME -- apt-get -y install joe screen conky-cli openssh-server curl unzip gdal-bin tar wget bzip2 build-essential clang git autoconf libtool libxml2-dev libbz2-dev libgeos-dev libgeos++-dev libproj-dev gdal-bin libgdal-dev g++ libmapnik-dev mapnik-utils python-mapnik libxml2-dev libfreetype6-dev libjpeg-dev libpng-dev libproj-dev libtiff-dev libcairo2 libcairo2-dev python-cairo python-cairo-dev libgdal-dev build-essential python-dev libbz2-dev libicu-dev libboost-all-dev apache2 apache2-dev python-yaml python-pip mapnik-utils fonts-noto-cjk fonts-noto-hinted fonts-noto-unhinted fonts-hanazono ttf-unifont fontconfig fonts-dejavu-core nodejs-legacy npm
lxc-attach -n $C
//https://ircama.github.io/osm-carto-tutorials/tile-server-ubuntu/
CONTAINERNAME=osm
PROCESSORCOUNT=$(cat /proc/cpuinfo | grep processor | wc -l) # used to speed up make
lxc-create -n $CONTAINERNAME -t download -- --arch amd64 --dist ubuntu --release xenial
lxc-start -n $CONTAINERNAME
lxc-attach -n $CONTAINERNAME -- apt-get update
lxc-attach -n $CONTAINERNAME -- apt-get -y upgrade
lxc-attach -n $CONTAINERNAME -- apt-get -y install joe screen conky-cli openssh-server curl unzip gdal-bin tar wget bzip2 build-essential clang git autoconf libtool libxml2-dev libbz2-dev libgeos-dev libgeos++-dev libproj-dev gdal-bin libgdal-dev g++ libmapnik-dev mapnik-utils python-mapnik libxml2-dev libfreetype6-dev libjpeg-dev libpng-dev libproj-dev libtiff-dev libcairo2 libcairo2-dev python-cairo python-cairo-dev libgdal-dev build-essential python-dev libbz2-dev libicu-dev libboost-all-dev apache2 apache2-dev python-yaml python-pip mapnik-utils fonts-noto-cjk fonts-noto-hinted fonts-noto-unhinted fonts-hanazono ttf-unifont font
@elbosso
elbosso / InfluxDBAppender.java
Created June 23, 2018 08:35
Appender for Log4j 1 streming logging events right into a time series database (InfluxDB)
package de.elbosso.util;
//This is by no means production-ready code!
/*Copyright (c) 2012-2018.
Juergen Key. Alle Rechte vorbehalten.
Weiterverbreitung und Verwendung in nichtkompilierter oder kompilierter Form,
mit oder ohne Veraenderung, sind unter den folgenden Bedingungen zulaessig:
1. Weiterverbreitete nichtkompilierte Exemplare muessen das obige Copyright,
die Liste der Bedingungen und den folgenden Haftungsausschluss im Quelltext
before_script:
- echo 'New job started'
after_script:
- echo 'Job finished'
stages:
- clean
- build-processors
- generate-algorithms
- generate-util
- generate-other-sources
<?xml version="1.0"?>
<configuration>
<configSections>
</configSections>
<startup>
<supportedRuntime version="v2.0.50727"/>
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<?xml version="1.0" encoding="utf-8" ?>
<InstallerSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<WebServerPort>8090</WebServerPort>
</InstallerSettings>
#!/bin/bash
apt-get update && apt-get -y upgrade
apt-get install git git-core cmake libusb-1.0-0-dev build-essential usbutils pkg-config joe mono-complete wget
lsusb
git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr
mkdir build
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
make install