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/gift-4-u.txt b/gift-4-u.txt | |
index ca36d0a..986e9c4 100644 | |
--- a/gift-4-u.txt | |
+++ b/gift-4-u.txt | |
@@ -1,2 +1,2 @@ | |
-I am sending this because you love patch files. :) | |
+I am sending this because you *really* love patch files. :) | |
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 99ca027e7f09c5a7dfd0e6804cc90325c223ffea Mon Sep 17 00:00:00 2001 | |
From: Ben Spaulding <[email protected]> | |
Date: Fri, 20 Mar 2009 00:17:14 -0500 | |
Subject: [PATCH] Created ``or_nothing`` filter in default filters. | |
The same thing can be accomplished with the ``default`` | |
filter and an empty argument, but that feels hacky and | |
it looks dirty, too. | |
--- | |
django/template/defaultfilters.py | 11 +++++++++++ |
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 c693dfaa46218537fb66e6e30638ee81f5374fac Mon Sep 17 00:00:00 2001 | |
From: Ben Spaulding <[email protected]> | |
Date: Fri, 20 Mar 2009 00:22:21 -0500 | |
Subject: [PATCH] Created ``yes`` filter in default filters. | |
MIME-Version: 1.0 | |
Content-Type: text/plain; charset=utf-8 | |
Content-Transfer-Encoding: 8bit | |
I cannot count the times that I wanted to output a string if | |
the value was true, but output nothing otherwise. This leads |
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/sh | |
echo Starting lighttpd | |
# What does this do? | |
exec 2>&1 | |
# Is there a reason for doing this rather than ``exec /etc/init.d/nginx start`` ? | |
exec /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf |
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 Foo(object): | |
bar = ['this', 'that'] | |
class Baz(Foo): | |
# What is the best way to make the bar attr equal to the super class’s | |
# bar attr with some more items appended to the list? | |
# | |
# This obviously doesn't work, but it is the sort of thing I want. |
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
# Middlware munging in staging settings.py | |
REMOVED_MIDDLEWARE_CLASSES = ( | |
'django.middleware.cache.UpdateCacheMiddleware', | |
'django.middleware.cache.FetchFromCacheMiddleware', | |
) | |
ORIGINAL_MIDDLEWARE_CLASSES = MIDDLEWARE_CLASSES | |
MIDDLEWARE_CLASSES = [] | |
for mwc in ORIGINAL_MIDDLEWARE_CLASSES: | |
if not mwc in REMOVED_MIDDLEWARE_CLASSES: | |
MIDDLEWARE_CLASSES.append(mwc) |
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.db import models | |
class ThingManager(models.Manager): | |
"""A manager for public Thing objects.""" | |
def get_query_set(self): | |
return super(ThingManager, self).get_query_set() # How can I | |
# get a QuerySet that returns all Thing objects that have at least | |
# one related Piece object whose is_public attr is True? |
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
$ git show HEAD | |
error: inflate: data stream error (incorrect header check) | |
error: corrupt loose object 'd8f69614ed296c2c033ba4a6a558d4c2cc76fe63' | |
fatal: object d8f69614ed296c2c033ba4a6a558d4c2cc76fe63 is corrupted |
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
/* Fix Redmine issue table issue. | |
This issue is only an issue with Webkit. Issue. | |
Something to do with the avatar float and the | |
table width … uhh … issue. So, one could say this | |
is a Webkit issue. :) | |
*/ | |
div.issue.details table[width="100%"] { | |
width: 85% !important; | |
} |
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
(* | |
AppleScript that quits and relaunches Bowtie. Bowtie has some | |
issues on Mac OS 10.6 and frequently needs restarted. | |
*) | |
set bowtieApp to application "Bowtie" | |
tell bowtieApp to quit | |
try | |
tell bowtieApp to run |
OlderNewer