View gist:20f24bea0b58575f7668
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
import slumber | |
import requests | |
import os | |
import lxml.html | |
import urllib | |
from urlparse import urljoin | |
from utils import all, quote_fs | |
SITE = 'https://trianglewiki.org' |
View gist:004396d336bc2bece97f
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 is a basic VCL configuration file for varnish. See the vcl(7) | |
# man page for details on VCL syntax and semantics. | |
# | |
# Default backend definition. Set this to point to your content | |
# server. | |
# | |
backend cloudmade { | |
# cloudmade tiles | |
#.host = "c.tile.cloudmade.com"; | |
.host = "54.230.151.226"; |
View abp add-art fix?
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(); |
View basepath for ckeditor
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 %}); | |
--> |
View gist:1394669
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 |
View create_template_postgis-debian.sh
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 |
View gist:1569228
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. | |
""" |
View gist:1572501
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() | |
############### |
View DavisWiki blackout page
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"> |
View request.py diff for SOPA PIPA
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