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 sys | |
import time | |
# Detect if we're running in a git repo | |
from os.path import exists, normpath | |
if exists(normpath('../pika')): | |
sys.path.insert(0, '..') | |
from pika.adapters import SelectConnection | |
from pika.connection import ConnectionParameters |
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 nose | |
import support | |
import support.tools | |
from pika.adapters import SelectConnection | |
class TestQueueConsumeAndDelete(support.tools.AsyncPattern): | |
@nose.tools.timed(2) | |
def test_send_invalid(self): |
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
Traceback (most recent call last): | |
File "/home/wulczer/virtualenv/ducksboard/lib/python2.7/site-packages/nose/case.py", line 187, in runTest | |
self.test(*self.arg) | |
File "/home/wulczer/virtualenv/ducksboard/lib/python2.7/site-packages/nose/tools.py", line 117, in newfunc | |
func(*arg, **kw) | |
File "/home/wulczer/src/pika/tests/functional/queue_consume_and_delete_test.py", line 21, in test_send_invalid | |
self.connection.ioloop.start() | |
File "../pika/adapters/select_connection.py", line 127, in start | |
self.poller.start() | |
File "../pika/adapters/select_connection.py", line 391, in start |
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
var jq = document.createElement('script'); | |
jq.type = 'text/javascript'; | |
jq.src =' https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js'; | |
jq.onload = function() { | |
console.log(window.jQuery); | |
var el = jQuery('table')[2]; | |
var block = false; | |
var blacklisted = /steve|jobs|apple/i; | |
jQuery('tr', el).each(function(_, elt) { |
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 a websocket and HTTP server on port 7000. The web page served over HTTP | |
connects to the websocket server and waits for database notifications. | |
After loading the page, connect to your database and run | |
=# NOTIFY data, 'some text'; | |
which should make 'some text' appear in the textarea. |
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
wulczer@hella:~/src/txpostgres$ git show-ref HEAD | |
d13f8ff5381f83a3521fc5067f5f310eba73fe73 refs/remotes/origin/HEAD | |
wulczer@hella:~/src/txpostgres$ python -c "import txpostgres; print txpostgres" | |
<module 'txpostgres' from 'txpostgres/__init__.pyc'> | |
wulczer@hella:~/src/txpostgres$ python txpostgres_error.py -n localhost -d twisted_test -u twisted_test -p twisted_test | |
<class 'psycopg2.ProgrammingError'> relation "nonexistent" does not exist | |
LINE 1: select * from nonexistent | |
^ | |
42P01 |
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 datetime | |
import collections | |
import logging | |
import itertools | |
from optparse import OptionParser | |
from libsaas.services import ducksboard, zendesk | |
logging.basicConfig(level=logging.WARNING) |
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 pika | |
from pika.adapters import TwistedConnection | |
from twisted.internet import task | |
def ok(ret): | |
print "published" | |
return ret |
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
wulczer=# select * from long_columns ; | |
t1 | t2 | t3 | |
-------------------------------------------------+--------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------- | |
some long text that doesn't fit in the terminal | other rather longish text, which in fact can overflow even my laptop's screen length | yet more long text, which at a measly three columns is enough to make things unreadable | |
(1 row) | |
wulczer=# \x | |
Expanded display is on. | |
wulczer=# select * from long_columns ; |
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 sys | |
import time | |
import threading | |
import urllib | |
import psycopg2 | |
OlderNewer