Skip to content

Instantly share code, notes, and snippets.

@maxim75
maxim75 / gist:1069068
Created July 7, 2011 07:59
Displaying GeoJSON data on Google Maps
<!DOCTYPE html>
<html>
<head>
<style>
#map_canvas {
width: 300px;
height: 300px;
}
</style>
@maxim75
maxim75 / init-deb.sh
Created July 9, 2011 23:48
Start script for nginx in ubuntu
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
@maxim75
maxim75 / gist:1221013
Created September 16, 2011 02:04
using deferreds in jQuery
function deferredTest(num, func)
{
var dfd = new $.Deferred();
console.log("deferredTest");
setTimeout(function() {
if(func(num))
{
console.log("resolve");
dfd.resolve( num );
}
@maxim75
maxim75 / gist:1224425
Created September 17, 2011 22:09
Sphinx search startup script for Ubuntu
#!/bin/bash
#
# Init file for searchd
#
# chkconfig: 2345 55 25
#
# description: searchd
#
# USE "chkconfig --add searchd" to configure Sphinx searchd service
#
test
@maxim75
maxim75 / gist:2785815
Created May 25, 2012 04:45
OpenLayers.mobile.js
/*
OpenLayers.js -- OpenLayers Map Viewer Library
Copyright (c) 2006-2012 by OpenLayers Contributors
Published under the 2-clause BSD license.
See http://openlayers.org/dev/license.txt for the full text of the license, and http://openlayers.org/dev/authors.txt for full list of contributors.
Includes compressed code under the following licenses:
@maxim75
maxim75 / README.md
Created August 6, 2015 01:58
HTML5 start template

Readme

import datetime
import exifread
import glob
import sys
import os
import shutil
import fractions
import pyexiv2
from geopy.distance import vincenty
@maxim75
maxim75 / a
Last active October 27, 2015 22:50
bbb
import serial
import datetime
ser = serial.Serial("/dev/cu.usbserial-0001", baudrate=9600)
ser.flushInput()
ser.flushOutput()
idx = 0
nmea_data = b""