Skip to content

Instantly share code, notes, and snippets.

View jsam's full-sized avatar
🦁

sam jsam

🦁
View GitHub Profile
@jsam
jsam / zeromq error
Created August 23, 2012 15:46
zeromq error
>>> import zmq
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "zmq.py", line 2, in <module>
from gevent_zeromq import zmq
File "/home/sam/.virtualenvs/gevent/local/lib/python2.7/site-packages/gevent_zeromq/__init__.py", line 23, in <module>
from zmq import devices
ImportError: cannot import name devices
@jsam
jsam / help('modules')
Created August 23, 2012 15:36
python gtk2 binding broken
>>> help('modules')
Please wait a moment while I gather a list of all available modules...
/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
import gobject._gobject
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
from gtk import _gtk
** (python:3139): CRITICAL **: pyg_register_boxed: assertion `boxed_type != 0' failed
@jsam
jsam / is it bug
Created August 23, 2012 08:46
gcrack bug?
(gcrack)sam@inflames:/home/sam/dev/github/myprojects/gcrack$ python2.7 gcrack.py testhashes
[+] Hashes loaded, using google_attack to crack them
md5(qwerty) d8578edf8458ce06fbc5bb76a58c5ca4
md5(alkali) f7f41ad5328d528a751c55fa2fcf7273
md5(password09) 8350513a8aff1d5bc1534dbd90747bb8
sha1(security) 8eec7bc461808e0b8a28783d0bec1a3a22eb0821
md5(admin) 21232f297a57a5a743894a0e4a801fc3
sha1(crypto) 44a9713350e53858f058463d4bf7f1e542d9ca4b
[+] Found 6 of 8
@jsam
jsam / sg
Created August 22, 2012 03:06
socketio and gevent
Traceback (most recent call last):
File "/home/sam/.virtualenvs/web_chat/local/lib/python2.7/site-packages/gevent/pywsgi.py", line 438, in handle_one_response
self.run_application()
File "/home/sam/.virtualenvs/web_chat/local/lib/python2.7/site-packages/gevent/pywsgi.py", line 425, in run_application
self.process_result()
File "/home/sam/.virtualenvs/web_chat/local/lib/python2.7/site-packages/gevent/pywsgi.py", line 414, in process_result
for data in self.result:
File "sock.py", line 60, in serve_file
with open(path) as fp:
IOError: [Errno 21] Is a directory: '/home/sam/dev/web_chat_test/public'
@jsam
jsam / django_tornado_handler.py
Created August 21, 2012 13:30 — forked from bdarnell/django_tornado_handler.py
django_tornado_handler.py
# NOTE: This code was extracted from a larger class and has not been
# tested in this form. Caveat emptor.
import django.conf
import django.contrib.auth
import django.core.handlers.wsgi
import django.db
import django.utils.importlib
import httplib
import json
import logging
@jsam
jsam / chat example error
Created August 21, 2012 00:07
django-gevent-sockeiot chat example error
Listening on http://127.0.0.1:9001 and on port 843 (flash policy server)
DEPRECATION WARNING: use `namespace` instead of `resource`
FAILED to start flash policy server: [Errno 13] Permission denied: ('0.0.0.0', 843)
Traceback (most recent call last):
File "/home/sam/.virtualenvs/socketio/local/lib/python2.7/site-packages/gevent/pywsgi.py", line 438, in handle_one_response
self.run_application()
File "/home/sam/.virtualenvs/socketio/local/lib/python2.7/site-packages/gevent/pywsgi.py", line 424, in run_application
self.result = self.application(self.environ, self.start_response)
File "/home/sam/.virtualenvs/socketio/src/django/django/core/handlers/wsgi.py", line 239, in __call__
signals.request_finished.send(sender=self.__class__)