Skip to content

Instantly share code, notes, and snippets.

Pirmin Kalberer pka

Block or report user

Report or block pka

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
extern crate actix;
extern crate futures;
use actix::dev::{MessageResponse, ResponseChannel};
use actix::*;
use futures::{future, Future};
use std::env;
// Message and Response data type
pka / quickfinder.sql
Last active Jun 9, 2017
Quickfinder adress search example
View quickfinder.sql
SELECT, lok.r1_text || COALESCE(' ' || hau.r1_hausnum, '') AS adresse, hau.wkb_geometry
FROM av.ge_hausnummerpos hau
JOIN av.ge_lokalisationsnamepos lok ON lok.r1_benannt=hau.r1_gebaeud;
CREATE INDEX adressen_trgm_idx ON av.adressen USING gin (adresse gin_trgm_ops);
SELECT adresse,ST_AsBinary(wkb_geometry)::geometry
FROM av.adressen
WHERE similarity(adresse, %(search)s) > 0.2
pka / index.html
Last active Dec 17, 2015
Progressive WMS
View index.html
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="stylesheet" href="" type="text/css">
<link rel="stylesheet" href="" type="text/css">
<script src=""></script>
<script type="text/javascript">
View x.js
// generated by create search command
name: "rails",
url: "{QUERY}",
icon: "",
parser: {
container: "#main_body > .result",
title: ".result_title > h3 > a",
maxResults: 10,
You can’t perform that action at this time.