Skip to content

Instantly share code, notes, and snippets.

View dg's full-sized avatar
🏠
Working from home

David Grudl dg

🏠
Working from home
View GitHub Profile
@dg
dg / gist:1009307
Created June 5, 2011 19:29
Routing in Django verus Nette Framework

DJANGO

In urls.py

# urls like "articles/2011/tutorial03" or "articles/2011/tutorial03.html" or "articles/2011/tutorial03.htm"

urlpatterns = patterns('',
    (r'articles/(?P<year>\d+)/(?P<item>[^/]+)(?:\.htm(?:l)?)?/?\$', 'articles.detail'),
)
@dg
dg / remotepick.bat
Created April 4, 2011 10:25
usage: remotepick nette kravco e7a90dd
call git remote add temp http://github.com/%2/%1.git
call git fetch temp
call git cherry-pick %3
call git remote rm temp