This file contains hidden or 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
def all_objects(request, admin): | |
from my_project.my_app.admin import ThisAdmin | |
class AllItemsAdmin(ThisAdmin): | |
list_display = ('item_name', 'start_date', 'press_summaries', 'photos', 'owner', 'output', 'visible') | |
list_display_links = (None,) | |
actions = None | |
def __init__(self, model, admin_site, request): | |
self.request = request |
This file contains hidden or 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.http import HttpResponse | |
from piston.resource import Resource | |
class FileResource(Resource): | |
def __init__(self, handler, authentication=None, filename=None): | |
if filename: | |
self.filename = filename | |
else: | |
self.filename = "export.txt" | |
super(FileResource, self).__init__(handler, authentication=authentication) |
This file contains hidden or 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 (c) 2008, Ryan Witt | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# * Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. | |
# * Redistributions in binary form must reproduce the above copyright | |
# notice, this list of conditions and the following disclaimer in the | |
# documentation and/or other materials provided with the distribution. |
This file contains hidden or 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/configure b/configure | |
old mode 100755 | |
new mode 100644 | |
index a9d0402..29cf71d | |
--- a/configure | |
+++ b/configure | |
@@ -6033,7 +6033,7 @@ echo $ECHO_N "checking for hstrerror prototype... $ECHO_C" >&6; } | |
if test "${sc_cv_have_prototype_hstrerror+set}" = set; then | |
echo $ECHO_N "(cached) $ECHO_C" >&6 | |
else |
This file contains hidden or 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 | |
def search(array, term): | |
print "searching for %d in %s" % (term, array) | |
length = len(array) | |
if length == 1: | |
if array[0] == term: | |
print "Found %s in %s." % (term, array) | |
return True | |
else: |
This file contains hidden or 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
==> make swig-pl | |
/bin/sh /private/tmp/homebrew-subversion-1.6.12-iBiI/subversion-1.6.12/libtool --tag=CC --silent --mode=compile /usr/bin/cc -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -O3 -march=nocona -mfpmath=sse -w -pipe -Wall -DNDEBUG -I/private/tmp/homebrew-subversion-1.6.12-iBiI/subversion-1.6.12/subversion -I/private/tmp/homebrew-subversion-1.6.12-iBiI/subversion-1.6.12/subversion/include -I/private/tmp/homebrew-subversion-1.6.12-iBiI/subversion-1.6.12/subversion/bindings/swig -I/private/tmp/homebrew-subversion-1.6.12-iBiI/subversion-1.6.12/subversion/bindings/swig/include -I/private/tmp/homebrew-subversion-1.6.12-iBiI/subversion-1.6.12/subversion/bindings/swig/proxy -I/private/tmp/homebrew-subversion-1.6.12-iBiI/subversion-1.6.12/subversion/bindings/swig/proxy -I/private/tmp/homebrew-subversion-1.6.12-iBiI/subversion-1.6.12/apr/include -I/private/tmp/homebrew-subversion-1.6.12-iBiI/subversion-1.6.12/apr-util/include -arch i386 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing |
This file contains hidden or 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 flask import Flask, render_template, request | |
from urllib import unquote | |
app = Flask(__name__) | |
@app.route("/<slug>/") | |
def ekit_index(slug): | |
template = "%s/index.html" % slug | |
return render_template(template) |
This file contains hidden or 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
server { | |
listen 80; | |
server_name example; | |
error_log /var/www/wordpress_blog/logs/nginx_error.log error; | |
root /var/www/wordpress_blog/public/; | |
try_files $uri @php; | |
location @php { | |
include fastcgi_params; |
This file contains hidden or 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 sys, os | |
sys.path.append('/usr/local/venvs/my_venv/') | |
sys.path.append('/usr/local/venvs/my_venv/my_project') | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'my_project.settings' |
This file contains hidden or 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
name: RabbitFish Documentation | |
description: Documentation for the RabbitFish static site generator. | |
pages: | |
- !Page | |
name: index | |
template: main.html | |
- !DynamicPage | |
name: features | |
template: main.html |