This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" Make a Git checkout from an SVN repository """ | |
import os | |
from optparse import OptionParser | |
from subprocess import Popen, PIPE | |
def run(cmd): | |
return Popen(cmd, stdout=PIPE).communicate()[0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -name "*.pattern" -exec bash -c "mv \"\$1\" \"\`echo \$1 | sed s/.pattern//\`\"" -- {} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is an example to create persistent forms using | |
* HTML5 localStorage + jQuery serialization and | |
* url.decode from http://www.webtoolkit.info/ | |
* | |
* | |
* The example bellow is seriously unoptimized. | |
* It listens to changing events in the form and | |
* serializes the data of the form in localStorage | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Linkify(inputText) { | |
//URLs starting with http://, https://, or ftp:// | |
var replacePattern1 = /(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gim; | |
var replacedText = inputText.replace(replacePattern1, '<a href="$1">$1</a>'); | |
//URLs starting with www. (without // before it, or it'd re-link the ones done above) | |
var replacePattern2 = /(^|[^\/])(www\.[\S]+(\b|$))/gim; | |
var replacedText = replacedText.replace(replacePattern2, '$1<a href="http://$2">$2</a>'); | |
//Change email addresses to mailto:: links |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from imposm.parser import OSMParser | |
from pyosm import OSMXMLFile, Node, Way | |
border_ways = {} | |
border_nodes = {} | |
node_ids = set() | |
got_nodes = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# | |
# Original version by Rory McCann (http://blog.technomancy.org/) | |
# Modifications by Christoph Lupprich (http://www.stopbeingcarbon.com) | |
# | |
import xml.sax | |
import logging | |
from xml.sax.saxutils import XMLGenerator | |
log = logging.getLogger("pyosm") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
func count_words(word, text string) int { | |
var skip [255]int | |
m := len(word) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pure-Python Douglas-Peucker line simplification/generalization | |
# | |
# this code was written by Schuyler Erle <[email protected]> and is | |
# made available in the public domain. | |
# | |
# the code was ported from a freely-licensed example at | |
# http://www.3dsoftware.com/Cartography/Programming/PolyLineReduction/ | |
# | |
# the original page is no longer available, but is mirrored at | |
# http://www.mappinghacks.com/code/PolyLineReduction/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
from lxml import etree | |
from multiprocessing import Process, Queue | |
import simplejson as json | |
import cPickle | |
import math | |
############### | |
# # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Alexandru Plugaru | |
email = [email protected] | |
[color] | |
ui = auto | |
[diff] | |
guitool = diffuse | |
[alias] | |
ci = commit --verbose | |
cam = commit -a --amend |
OlderNewer