Skip to content

Instantly share code, notes, and snippets.

View miklobit's full-sized avatar

MK miklobit

View GitHub Profile
@miklobit
miklobit / 0_reuse_code.js
Created April 4, 2014 00:38
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@miklobit
miklobit / Control.Filters.css
Last active August 29, 2015 13:59
Test mapbox.js with: tilejson, locate control, draggable markers, custom control (Filters)
.leaflet-control-layers {
background-color:#fff;
border:1px solid #999;
border-color:rgba(0,0,0,0.4);
border-radius:3px;
box-shadow:none;
}
L.Control.Button = L.Control.extend({
options: {
position: 'bottomleft'
},
initialize: function (options) {
this._button = {};
this.setButton(options);
},
@miklobit
miklobit / index.html
Last active August 29, 2015 14:00
List -> svg matrix
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Ubuntu", Helvetica, Arial, sans-serif;
margin: auto;
position: relative;
width: 960px;
}
@miklobit
miklobit / index.html
Created May 1, 2014 08:06 — forked from biovisualize/index.html
Download svg generated from D3
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<title>Download SVG</title>
<style type="text/css">
#download{
cursor: pointer;
text-decoration: none;
color: black;
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<title>Download SVG</title>
<style type="text/css">
a{
cursor: pointer;
text-decoration: underline;
color: black;

Google Speech To Text API

Base URL: https://www.google.com/speech-api/v1/recognize
It accepts POST requests with voice file encoded in FLAC format, and query parameters for control.

Query Parameters

client
The client's name you're connecting from. For spoofing purposes, let's use chromium

lang
Speech language, for example, ar-QA for Qatari Arabic, or en-US for U.S. English

@miklobit
miklobit / index.html
Last active August 29, 2015 14:02
svg template with paging
<!DOCTYPE html>
<html>
<body>
<!-- Created with Inkscape (http://www.inkscape.org/)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
@miklobit
miklobit / aga.json
Last active August 29, 2015 14:02
Działki AGA
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#! /usr/bin/python2
# vim: fileencoding=utf-8 encoding=utf-8 et sw=4
import sys
import os
import xml.etree.cElementTree as ElementTree
import string
outroot = ElementTree.Element("osm", { "version": "0.6" })
bldgroot = ElementTree.parse(sys.argv[1]).getroot()