Skip to content

Instantly share code, notes, and snippets.

View mapcentia's full-sized avatar

Martin Høgh mapcentia

View GitHub Profile
@mapcentia
mapcentia / gist:baca0ff9461b064b963a
Last active April 19, 2016 12:27
GC2 Docker, all
Moved to https://github.com/mapcentia/geocloud2/wiki/Install-GC2
@mapcentia
mapcentia / gist:1f2d8a6b4369beb1c930
Last active August 6, 2021 06:15
Install Ubertooth and Kismet on Raspbian
#!/bin/bash
#Install build tools and dependencies
apt-get -y update
apt-get -y install cmake libusb-1.0-0-dev make gcc g++ libbluetooth-dev libncurses5-dev libnl-dev \
pkg-config libpcap-dev python-numpy python-pyside python-qt4
#Get and build libbtbb
cd ~
wget https://github.com/greatscottgadgets/libbtbb/archive/2015-10-R1.tar.gz -O libbtbb-2015-10-R1.tar.gz
@mapcentia
mapcentia / gist:3c753a0068bb013b908a
Created March 11, 2016 12:32
Python script for shipping Kismet logs to GC2
import sys, re, urllib, urllib2
args =sys.argv
filesource = args[1]
apikey = args[2]
list = [];
networks = {};
try:
f = open('count','r+')
except:
w = open('count','w')
@mapcentia
mapcentia / gist:36c56b6a91c19214aeb3
Created March 20, 2016 18:58
A MapCache grid file
<grid name="25832">
<metadata>
<title>Dansk UMT</title>
</metadata>
<extent>120000 5900000 1000000 6500000</extent>
<srs>EPSG:25832</srs>
<srsalias>EPSG:25832</srsalias>
<units>m</units>
<size>256 256</size>
<resolutions>1638.4 819.2 409.6 204.8 102.4 51.2 25.6 12.8 6.4 3.2 1.6 0.8 0.4 0.2 0.1</resolutions>
sudo su
apt-get update
apt-get install ppp usb-modeswitch wvdial
# Sæt modemet i usb porten
lsusb
# Du skal se:
# 12d1:14fe Huawei Technologies Co., Ltd.
# 14fe betyder at den er i storing mode, dvs. at den fungerer som en usb memory-stick
<?php
ini_set("display_errors", "On");
header("Content-type: text/plain");
require_once('/var/www/geocloud2/app/libs/vendor/autoload.php');
use Postmark\PostmarkClient;
use Postmark\Models\PostmarkException;
try {
$client = new PostmarkClient("<my token>");
module.exports = {
backend: "gc2",
gc2: {
host: "http://cowi.mapcentia.com"
},
print: {
templates: {
"print": {
A4: {
l: {
# systemd script for starting and stopping GC2 Docker containers.
# The start.sh script stays in the foreground and will exit if a container stops.
# If start.sh exits systemd will run the start.sh again and keep containers running.
# How to install
# Edit and put this content in /etc/systemd/system/gc2.service
# systemctl enable gc2
# GC2 containers can be started/stopped by these cmds
# service gc2 start
SET PGCLIENTENCODING=LATIN1
ogr2ogr.exe -a_srs 'EPSG:25832' -f 'PostgreSQL' PG:'host=postgis user=gc2 password=1234 dbname=mydb' 'trafikstier.tab' -nln public.trafikstier -nlt multilinestring
module.exports = {
// Følgende settings bliver sat under build/startup.
// Dvs at de ikke kan ændres i runtime.
// Bemærk, at baselayers er flyttet ud af cartodb objektet.
// ========================================================
backend: "cartodb",
cartodb: {
db: "mhoegh"