Skip to content

Instantly share code, notes, and snippets.

@MaZderMind
MaZderMind / easing.py
Last active August 29, 2015 14:26 — forked from th0ma5w/easing.py
Easing Equations in Python (orig by Robert Penner)
# ported from http://www.gizma.com/easing/ to https://gist.github.com/th0ma5w/9883420
# added some from https://gist.github.com/cleure/e5ba94f94e828a3f5466
# added some from http://gsgd.co.uk/sandbox/jquery/easing/jquery.easing.1.3.js
import math
def easeLinear(t, b, c, d):
return c*t/d + b
def easeInQuad(t, b, c, d):
var style = require('./style.js');
// postgres reader
var r = new PostgresReader({
db: 'mapnik',
user: 'osm',
pass: 'pass',
// one could query imposm-like tables, too
tables: {
@MaZderMind
MaZderMind / gist:2472097
Created April 23, 2012 16:28
osmium diff for homebrew
diff --git a/Makefile b/Makefile
index 36e756f..81ae651 100644
--- a/Makefile
+++ b/Makefile
@@ -10,10 +10,10 @@ clean:
rm -fr doc/html
install: doc
- install -m 755 -g root -o root -d $(DESTDIR)/usr/include
- install -m 755 -g root -o root -d $(DESTDIR)/usr/share/doc/libosmium-dev
@MaZderMind
MaZderMind / osmium.rb
Created April 26, 2012 14:57 — forked from christoph-buente/osmium.rb
Osmium Homebrew formula
require 'formula'
class Osmium < Formula
head 'https://github.com/joto/osmium.git'
homepage 'http://wiki.openstreetmap.org/wiki/Osmium'
md5 'dce9eb59d86caf1186fc93567b94feed'
depends_on 'boost'
depends_on 'lzlib'
depends_on 'shapelib'
<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' upload='true' generator='JOSM'>
<node id='-20' action='modify' visible='true' lat='0.007545848364784001' lon='-0.042220818353617504' />
<node id='-18' action='modify' visible='true' lat='0.024254511946816243' lon='-0.01563068594367967' />
<node id='-16' action='modify' visible='true' lat='-6.288206988774027E-4' lon='0.009432310483254975' />
<node id='-14' action='modify' visible='true' lat='-0.024883332587896705' lon='-0.04545475337644778' />
<node id='-12' action='modify' visible='true' lat='-0.03296816910796113' lon='0.010240794238962547' />
<node id='-10' action='modify' visible='true' lat='0.007006859198660702' lon='-0.025691817125818313' />
<node id='-8' action='modify' visible='true' lat='0.013115403033600963' lon='-0.016169675114151388' />
<node id='-6' action='modify' visible='true' lat='7.186522272704126E-4' lon='-0.0035034296080661336' />
@MaZderMind
MaZderMind / gist:3225668
Created August 1, 2012 10:26
valid-date-bug
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="Osmium (http://wiki.openstreetmap.org/wiki/Osmium)">
<bounds minlon="8.1843450" minlat="49.7872840" maxlon="8.1853060" maxlat="49.7880220"/>
<node id="115105155" version="1" timestamp="2007-11-15T11:32:33Z" uid="573" user="Jörg Ostertag" changeset="520752" visible="true" lat="49.7843958" lon="8.1898660"/>
<node id="115105155" version="2" timestamp="2009-03-30T20:53:02Z" uid="111159" user="MaZderMind" changeset="871151" visible="true" lat="49.7843561" lon="8.1897440"/>
<node id="115105155" version="3" timestamp="2009-04-07T05:43:54Z" uid="111159" user="MaZderMind" changeset="309863" visible="true" lat="49.7844842" lon="8.1897131"/>
<node id="115105159" version="1" timestamp="2007-11-15T11:32:33Z" uid="573" user="Jörg Ostertag" changeset="520752" visible="true" lat="49.7845467" lon="8.1903491"/>
<node id="115105159" version="2" timestamp="2007-11-28T13:05:17Z" uid="11008" user="spacer1971" changeset="641678" visible="true" lat=
http://localhost:1500/api/today-info
http://localhost:1500/api/today-info?date=yesterday
http://localhost:1500/api/today-info?date=tomorrow
http://localhost:1500/api/today-info?date=2013-06-22
http://localhost:1500/api/upcoming-info
http://localhost:1500/api/upcoming-info?num=100
@MaZderMind
MaZderMind / gist:6071131
Created July 24, 2013 14:34
How to use Typo3 language specific strings without conditions

Uncool

lib.BOOKMARKS {
  50 = TEXT
  50.value = Deutschertext

  50.typolink.parameter = 87

  50.wrap = <li class="link-de">|</li>
}
[
{
"conference": "32C3",
"group": "Lecture Rooms",
"rooms": [
{
"slug": "hall1",
"schedulename": "Hall 1",
"thumb": "https://streaming.media.ccc.de/32c3/../thumbs/s1.png",
"link": "https://streaming.media.ccc.de/32c3/hall1/",
#!/bin/bash -ex
gst-launch-1.0 \
v4l2src device=$HDMI2USB !\
image/jpeg,width=1280,height=720 !\
jpegdec !\
videoconvert !\
videorate !\
video/x-raw,format=I420,width=1280,height=720,framerate=30/1,pixel-aspect-ratio=1/1 !\
queue !\