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 file should be readable and writable by apache | |
WSGISocketPrefix ${APACHE_RUN_DIR} | |
#NOTE: all urs below will need to be adjusted if | |
#settings.FORUM_SCRIPT_ALIAS !='' (e.g. = 'forum/') | |
#this allows "rooting" forum at [http://example.com/forum], if you like | |
<VirtualHost *> | |
ServerAdmin [email protected] | |
DocumentRoot /home/osqa/sites/beta-meta-d3c | |
ServerName beta.meta.draw3cards.com |
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
[Mon Mar 28 12:04:50 2011] [error] [client 84.109.88.3] mod_wsgi (pid=14998): Exception occurred processing WSGI script '/home/osqa/sites/beta-meta-d3c/osqa.wsgi'. | |
[Mon Mar 28 12:04:50 2011] [error] [client 84.109.88.3] Traceback (most recent call last): | |
[Mon Mar 28 12:04:50 2011] [error] [client 84.109.88.3] File "/usr/lib/pymodules/python2.6/django/core/handlers/wsgi.py", line 230, in __call__ | |
[Mon Mar 28 12:04:50 2011] [error] [client 84.109.88.3] self.load_middleware() | |
[Mon Mar 28 12:04:50 2011] [error] [client 84.109.88.3] File "/usr/lib/pymodules/python2.6/django/core/handlers/base.py", line 33, in load_middleware | |
[Mon Mar 28 12:04:50 2011] [error] [client 84.109.88.3] for middleware_path in settings.MIDDLEWARE_CLASSES: | |
[Mon Mar 28 12:04:50 2011] [error] [client 84.109.88.3] File "/usr/lib/pymodules/python2.6/django/utils/functional.py", line 276, in __getattr__ | |
[Mon Mar 28 12:04:50 2011] [error] [client 84.109.88.3] self._setup() | |
[Mon Mar 28 12:04:50 2011] [error] [client 84.109.88.3] |
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 os | |
import sys | |
sys.path.append('/home/osqa/sites') | |
sys.path.append('/home/osqa/sites/beta-meta-d3c') | |
# The first part of this module name should be identical to the directory name | |
# of the OSQA source. For instance, if the full path to OSQA is | |
# /home/osqa/osqa-server, then the DJANGO_SETTINGS_MODULE should have a value | |
# of 'osqa-server.settings'. | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'beta-meta-d3c.settings' | |
import django.core.handlers.wsgi |
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 os | |
import sys | |
sys.path.append('/home/osqa/sites') | |
sys.path.append('/home/osqa/sites/meta-d3c') | |
# The first part of this module name should be identical to the directory name | |
# of the OSQA source. For instance, if the full path to OSQA is | |
# /home/osqa/osqa-server, then the DJANGO_SETTINGS_MODULE should have a value | |
# of 'osqa-server.settings'. | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'meta-d3c.settings' | |
import django.core.handlers.wsgi |
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 file should be readable and writable by apache | |
WSGISocketPrefix ${APACHE_RUN_DIR} | |
#NOTE: all urs below will need to be adjusted if | |
#settings.FORUM_SCRIPT_ALIAS !='' (e.g. = 'forum/') | |
#this allows "rooting" forum at [http://example.com/forum], if you like | |
<VirtualHost *> | |
ServerAdmin [email protected] | |
DocumentRoot /home/osqa/sites/meta-d3c | |
ServerName meta.draw3cards.com |
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 file should be readable and writable by apache | |
WSGISocketPrefix ${APACHE_RUN_DIR} | |
#NOTE: all urs below will need to be adjusted if | |
#settings.FORUM_SCRIPT_ALIAS !='' (e.g. = 'forum/') | |
#this allows "rooting" forum at [http://example.com/forum], if you like | |
<VirtualHost *> | |
ServerAdmin [email protected] | |
DocumentRoot /home/osqa/sites/beta-meta-d3c | |
ServerName beta.meta.draw3cards.com |
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
GET /p/speed-up-your-blog-with-thre-easy-steps/ HTTP/1.1 | |
Host: ripper234.com | |
Connection: keep-alive | |
Referer: http://ripper234.com/ | |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16 | |
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | |
Accept-Encoding: gzip,deflate,sdch | |
Accept-Language: en-US,en;q=0.8,he-IL;q=0.6,he;q=0.4 | |
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 | |
Cookie: __utmz=27450175.1296369352.8.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=27450175.1129377544.1267634422.1296369352.1299410583.9; wordpress_logged_in_4dac7f8c0ee81e4281f07f7dc11731c0=ripper234%7C1331659908%7C59e2bda267b211867d8cec34d3de1b8c; subscribe_checkbox_4dac7f8c0ee81e4281f07f7dc11731c0=unchecked; PHPSESSID=778ogtjs3adrv1h44agbhgq663; wp-settings-2=m0%3Do%26m1%3Do%26m2%3Do%26m3%3Dc%26m4%3Dc%26m5%3Do%26m6%3Do%26m7%3Dc%26m8%3Do%26m9%3Do%26m10%3Dc%26editor%3Dtinymce%26align%3Dleft; wp-settings-time- |
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
// original (broken) version is here: http://ivan-ghandhi.livejournal.com/942493.html | |
// My fix: don't treat arguments as if it were an array | |
// (Use Array.prototype.slice.call() to convert it) | |
function stacktrace() { | |
function st2(f) { | |
return !f ? [] : | |
st2(f.caller).concat([f.toString().split('(')[0].substring(9) + '(' + Array.prototype.slice.call(f.arguments).join(',') + ')']); | |
} | |
return st2(arguments.callee.caller); |
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 java.util.Date; | |
String lastDateStr = null; | |
new File('trades.csv').eachLine({ | |
def columns = it.split(',') | |
def date = new Date(columns[0].toLong() * 1000) | |
String dateStr = (1900 + date.getYear()) + "-" + (date.getMonth() + 1) + "-" + date.getDate() ; | |
if (dateStr != lastDateStr) { | |
lastDateStr = dateStr; | |
println dateStr + ", " + columns[1] |
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
// Strip all background-image styles from :hover elements | |
// This causes weird issues in Chrome | |
// http://stackoverflow.com/questions/8035366/image-flickering-on-mouseover-even-when-sprites-are-used-for-hover-image/8057250#8057250 | |
// | |
// Note - this snippet has not been thoroughly tested, and uses simple regex - it's not aware of the actual CSS structure, and might make mistakes | |
// (E.g. a "}" inside of a comment might fool it | |
def cssFile = new File("$outputDir/css/combined-sprite.css") | |
String newCss = "" | |
boolean inHover = false | |
cssFile.eachLine(){ line -> |
OlderNewer