This file contains 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
// A HTML markup module for GeoJSON points. In addition to well formatted | |
// coordinate output, it creates a Wikipedia-favoured link to | |
// tools.wmflabs.org/geohack | |
// | |
// Usage example: | |
// var p = { type: 'Point', coordinates: [-118.25013445, 34.05394492] } | |
// var html = geostamp(p); | |
// | |
// Looks like: | |
// 34.053944° N, 118.250134° E |
This file contains 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
// Mirror console logs into a small div at top-left corner, | |
// styled in post-apocalyptic way ;) | |
// | |
// Usage is simple, just: | |
// <script src='ghoulog.js'></script> | |
// | |
// Note: | |
// You must set body { position: relative; } to let log div to be | |
// absolutely positioned. | |
// |
This file contains 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
''' | |
Copyright 2016 Akseli Palén. | |
Created 2016-04-02. | |
Licensed under the MIT license. | |
<license> | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files | |
(the "Software"), to deal in the Software without restriction, | |
including without limitation the rights to use, copy, modify, merge, |
This file contains 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
""" | |
List files of zero size. | |
Takes in a filepath of a textfile containing a list of filepaths | |
and looks if the list contains files with filesize of zero. | |
The filepaths of files with zero size are stored to file named | |
the original filepath of the list prefixed _zeros | |
Example Usage |
This file contains 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
# -*- coding: utf-8 -*- | |
# Source: | |
# https://gist.github.com/3263576 | |
import re | |
from django.utils.text import compress_string | |
from django.utils.cache import patch_vary_headers | |
from django import http | |
import settings |
This file contains 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
/** | |
* Copyright 2012 Akseli Palén. | |
* Created 2012-07-15. | |
* Licensed under the MIT license. | |
* | |
* <license> | |
* Permission is hereby granted, free of charge, to any person obtaining | |
* a copy of this software and associated documentation files | |
* (the "Software"), to deal in the Software without restriction, | |
* including without limitation the rights to use, copy, modify, merge, |