Skip to content

Instantly share code, notes, and snippets.

@Eccenux
Eccenux / gist:f338e1d25530d9e05a40
Last active August 29, 2015 14:14
Geocoding example
// see: https://developers.google.com/maps/documentation/javascript/geocoding
var geocoder = new google.maps.Geocoder();
geocoder.geocode({
address: someAddressString,
region: 'no'
},
function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
var location = results[0].geometry.location;
latitude.value = location.lat();
@Eccenux
Eccenux / overlayText.js
Created December 16, 2014 15:05
Google Maps `overlayText` helper
//
// Overlay for adding some HTML text on cords specified by bounds over the given map
//
function overlayText(bounds, HTMLcontent, map, minZoomToBeShow)
{
// Now initialize all properties.
this.bounds_ = bounds;
this.HTMLcontent_ = HTMLcontent;
this.map_ = map;
@Eccenux
Eccenux / archive.py
Last active October 8, 2015 06:54
Python archive (zip) helper class
#!/usr/bin/env python
import os
import zipfile
"""
Helper class that lets one add whole directory contents.
License
--------------------
@Eccenux
Eccenux / index.mini.html
Created August 5, 2014 11:07
PHP DOM parser - problem with HTML whitespace
<!DOCTYPE html>
<!--
Copyright: ©2014 Nux
License: CC0
-->
<html>
<head>
<title>Test</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta charset="UTF-8">
@Eccenux
Eccenux / odbc_sql_test.php
Created July 23, 2014 11:09
PHP Bug #47803 test case
<?
include './odbc_sql_test_settings.php';
echo phpversion();
date_default_timezone_set('Europe/Warsaw');
$link = odbc_connect(DB_SETTINGS_DSN, DB_SETTINGS_USER, DB_SETTINGS_PASS);
$upd_params = array(