Skip to content

Instantly share code, notes, and snippets.

View miklobit's full-sized avatar

MK miklobit

View GitHub Profile
@miklobit
miklobit / index.html
Last active December 29, 2015 07:49 — forked from gijs/index.html
<html>
<head>
<title>Testing d3.js in Leaflet.js</title>
<link rel="stylesheet" href="leaflet.css" />
<script type="text/javascript" src="http://d3js.org/d3.v2.min.js?2.9.3"></script>
<script src="http://code.leafletjs.com/leaflet-0.3.1/leaflet.js"></script>
<style type="text/css">
import urllib
import urllib2
import os.path
from lxml import etree
import string
def output_node(node, message):
link = e.attrib['v'].encode('utf-8')
link = link.replace("pl:", "")
print
@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#"