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
property dueTag : "due" | |
property startTag : "start" | |
property repeatTag : "repeat" | |
property todayTag : "today" | |
property tomorrowTag : "tomorrow" | |
property pastDueTag : "overdue" | |
property upcomingTag : "upcoming" | |
property doneTag : "done" | |
property inProgressTag : "inprogress" | |
property errorTag : "error" |
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
on getTextFromDate(vDate) | |
set dText to ((year of vDate) as text) & "-" | |
set dayText to (month of vDate as number) as text | |
if length of dayText is 1 then | |
set dayText to "0" & dayText | |
end if | |
set dText to dText & dayText & "-" | |
set dayText to (day of vDate as number) as text | |
if length of dayText is 1 then | |
set dayText to "0" & dayText |
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
#!/usr/bin/env python | |
""" | |
Obviously this is only useful if you have to deal with Django's | |
Trac a lot. | |
Mostly stolen from Jacob Kaplan-Moss, but improved by Jannis Leidel. | |
Reads a config file at ~/.djpatchrc, e.g.: |
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
class SeleniumTests(SeleniumTestCase): | |
fixtures = ['admin-views-users.xml'] | |
urls = "regressiontests.admin_views.urls" | |
def admin_login(self, username, password): | |
""" | |
Helper function to log into the admin. | |
""" | |
self.selenium.open('/test_admin/admin/') | |
self.selenium.type('username', username) |
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
class AdminInlinesSeleniumTests(SeleniumTestCase): | |
fixtures = ['admin-views-users.xml'] | |
urls = "regressiontests.admin_inlines.urls" | |
def admin_login(self, username, password): | |
""" | |
Helper function to log into the admin. | |
""" | |
self.selenium.open('/admin/') | |
self.selenium.type('username', username) |
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
------------------------------------------------------------------------ | |
zip-test.py: | |
import zipfile | |
zf = zipfile.ZipFile('django-compressor-1.1.2.pybundle', 'r') | |
zf.debug=3 | |
------------------------------------------------------------------------ | |
$ python zip-test.py |
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/django/views/debug.py b/django/views/debug.py | |
index 7bdf0d2..d95cd62 100644 | |
--- a/django/views/debug.py | |
+++ b/django/views/debug.py | |
@@ -155,9 +155,20 @@ class SafeExceptionReporterFilter(ExceptionReporterFilter): | |
Replaces the values of variables marked as sensitive with | |
stars (*********). | |
""" | |
- func_name = tb_frame.f_code.co_name | |
- func = tb_frame.f_globals.get(func_name) |
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
%w{libjpeg-dev libfreetype6-dev}.each do |pkg| | |
package pkg do | |
action :install | |
end | |
end | |
bash "Install PIL from source" do | |
user vagrant | |
group vagrant | |
code <<-EOH |
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
# Author: Julien Phalip | |
# License: BSD | |
# Description: Change the current directory to the path of the given Python package. | |
function goto { | |
cd `python -c "import pkgutil; print(pkgutil.get_loader('$1').filename)"` | |
} | |
function _top_level_packages { | |
python -c "import pkgutil; print('\n'.join([name for loader, name, ispkg in sorted(pkgutil.iter_modules()) if ispkg]))" |
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
#!/usr/bin/env python | |
import argparse | |
import re | |
import os | |
import subprocess | |
try: | |
import json | |
except ImportError: | |
import simplejson as json |
OlderNewer