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
diff --git a/addart/components/addart.js b/addart/components/addart.js | |
index 6e1a596..fe5563d 100755 | |
--- a/addart/components/addart.js | |
+++ b/addart/components/addart.js | |
@@ -106,11 +106,23 @@ org.eyebeam.addArt.component = { | |
init: function() { | |
// Retrieve ABP component | |
var abp = null; | |
- try { | |
- abp = Components.classes["@mozilla.org/adblockplus;1"].createInstance(); |
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
""" | |
This likely isn't useful to anybody else. But it's an example of how to | |
adapt python's ftplib to grab just the first few kb of a given file. | |
In this case, all we need is the first few kb to get the metadata from a | |
GeoTIFF file. | |
""" | |
import ftplib |
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
""" | |
Likely not useful to anyone else, but just putting it out there. | |
This script will take a directory of GeoTIFFs and merge them together without issues. | |
This script simply decompresses the files, runs nearblack to remove pseudo-black borders caused by compression, and then uses gdalwarp to stitch the files together. | |
The script is designed to use the minimal amount of disk space possible -- it cleans up each file after decompression and continually merges with a master image. | |
""" | |
import os |
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
diff --git a/sapling/ckeditor/templates/ckeditor/ckeditor_script.html b/sapling/ckeditor/templates/ckeditor/ckeditor_script.html | |
index 7e3f404..6f536be 100644 | |
--- a/sapling/ckeditor/templates/ckeditor/ckeditor_script.html | |
+++ b/sapling/ckeditor/templates/ckeditor/ckeditor_script.html | |
@@ -1,5 +1,6 @@ | |
<script type="text/javascript"> | |
<!-- | |
+CKEDITOR.basePath = '{{ STATIC_URL }}js/ckeditor/'; | |
CKEDITOR.replace('id_{{ name }}'{% if config %}, {{ config|safe }}{% endif %}); | |
--> |
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
== Updating to 0.2 == | |
1. Move your current localsettings.py out of the sapling directory and rename it: | |
$ mv sapling/localsettings.py sapling/../localsettings.py.bak | |
2. Activate your virtualenv: | |
$ source env/bin/activate |
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
#!/bin/bash | |
# For Ubuntu 8.x and 9.x releases. | |
if [ -d "/usr/share/postgresql-8.3-postgis" ] | |
then | |
POSTGIS_SQL_PATH=/usr/share/postgresql-8.3-postgis | |
POSTGIS_SQL=lwpostgis.sql | |
fi | |
# For Ubuntu 10.04 |
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
from django.middleware.cache import UpdateCacheMiddleware | |
from django.utils.cache import learn_cache_key, get_max_age | |
class UpdateCacheMiddlewareNoHeaders(UpdateCacheMiddleware): | |
""" | |
Just like UpdateCacheMiddleware but we don't set cache headers in the | |
HTTP response. | |
""" |
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
Run: | |
localwiki-manage shell | |
then enter this, afer editing the `ago` value: | |
import datetime | |
now = datetime.datetime.now() | |
############### |
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
<html lang="en"> | |
<head> | |
<title>Day of Protest</title> | |
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'> | |
<style type="text/css"> |
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
wikispot@leo:~/Sycamore$ diff request.py.old request.py | |
34a35,172 | |
> MAX_POST_PER_MINUTE = 40 | |
> | |
> DO_SOPA = True | |
> SOPA_HTML = """<html lang="en"> | |
> <head> | |
> <title>Davis Wiki - Day of Protest</title> | |
> | |
> <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'> |
OlderNewer