Skip to content

Instantly share code, notes, and snippets.

View crstn's full-sized avatar
💭
🤓

Carsten Keßler crstn

💭
🤓
View GitHub Profile
@crstn
crstn / SNIPPET-FROM-single.php
Created September 28, 2012 10:26
Blognavigation zwischen Einträgen
<div class="post" id="post-<?php the_ID(); ?>">
<div id="prev-post"><?php previous_post_link('%link', '&laquo;') ?></div>
<div id="next-post"><?php next_post_link('%link', '&raquo;') ?></div>
...
</div>
@crstn
crstn / README.txt
Created October 2, 2012 14:51 — forked from flaviaza/README.txt
Twitter bootstrap fixed table header using jQuery
Here is a simple jQuery plugin to make a table header fixed on top of a div when this is scrolled.
Using the code from twitter bootstrap documentation page, this code is customized for table header.
Create the table with following layout -
<div class="row fixed-table">
<div class="table-content">
<table class="table table-striped table-fixed-header" id="mytable">
<thead class="header">
<tr>
<th>Email Address</th>
@crstn
crstn / gist:3830081
Created October 3, 2012 21:47
MUSIL publications list
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:bibo="http://purl.org/ontology/bibo/">
<head>
<meta http-equiv="Content-Type" content="text/html" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
</head>
<body>
@crstn
crstn / gist:3990276
Created October 31, 2012 22:09
My Fuseki configuration
@prefix : <#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
[] rdf:type fuseki:Server ;
fuseki:services (
@crstn
crstn / RDF in Turtle to PDF Graph
Last active September 15, 2018 10:11
Create a graph visualization from an RDF file using http://librdf.org/raptor/ and http://www.graphviz.org.
rapper -i turtle -o dot model.ttl | dot -Tpdf -omodel.pdf
@crstn
crstn / Query 1: Get all counts, sorted by date (new to old).sparql
Last active December 20, 2015 12:29
Demo for point in time data in HXL. See comments below for a how-to.
prefix hxl: <http://hxl.humanitarianresponse.info/ns/#>
SELECT ?population ?count ?date
WHERE {
GRAPH ?g {
?population hxl:personCount ?count .
?g hxl:validOn ?date .
}
} ORDER BY ?population DESC(?date)
@crstn
crstn / gist:6552662
Last active December 23, 2015 00:19
Transforms JSON files exported from the moves API [1] into GeoJSON, which can then be used in a number of applications, such as CartoDB or Leaflet. [1] http://dev.moves-app.com
<?php
// this is the directory where you have your json files from the moves API stored
$dir = "/my/input/dir";
// this is where your geojson files will be stored
$outdir = "/my/output/dir";
$geojsonplaces = [
"type" => "FeatureCollection",
"features" => [ ],
];
@crstn
crstn / functions.php
Created February 7, 2014 19:26
Piwik RSS feed tracking via blind pixels
// Add this to the functions.php of your wordpress Theme. Get the URL for the tracking pixel from your Piwik instance.
function feedFilter($query) {
if ($query->is_feed) {
add_filter('the_content','feedContentFilter');
}
return $query;
}
add_filter('pre_get_posts','feedFilter');
@crstn
crstn / iati.csv
Last active August 29, 2015 13:57 — forked from mbostock/.block
country usd
MNE 212071344
EST -3643199
HUN -6611887
JOR 1289290880
ERI 42736336
SVN -1732240
MKD 116353200
MYS 10559068
SRB 143880736
@crstn
crstn / index.html
Last active August 29, 2015 13:57
UNHCR refugee flows 2012
<!DOCTYPE html>
<meta charset="utf-8">
<head>
<title>UNHCR Refugee Flows 2012</title>
<style>
body{
font-family: "Helvetica", sans-serif;
text-align: center;
}