Skip to content

Instantly share code, notes, and snippets.

bassdread

  • UK
Block or report user

Report or block bassdread

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bassdread
bassdread / gist:958806
Created May 6, 2011
Locker error when starting up
View gist:958806
TypeError: Invalid argument to getAgent
at Object.getAgent (http.js:1446:11)
at _getAgent (/home/channam/Code/Locker/node_modules/http-proxy/lib/node-http-proxy.js:48:30)
at [object Object].proxyRequest (/home/channam/Code/Locker/node_modules/http-proxy/lib/node-http-proxy.js:377:12)
at proxied (/home/channam/Code/Locker/Ops/webservice.js:336:11)
at Object.<anonymous> (/home/channam/Code/Locker/Ops/webservice.js:329:5)
at param (/home/channam/Code/Locker/node_modules/connect/lib/middleware/router.js:147:21)
at pass (/home/channam/Code/Locker/node_modules/connect/lib/middleware/router.js:163:10)
at Object.router [as handle] (/home/channam/Code/Locker/node_modules/connect/lib/middleware/router.js:169:6)
at next (/home/channam/Code/Locker/node_modules/connect/lib/http.js:204:15)
@bassdread
bassdread / gist:960005
Created May 6, 2011
Failing to render a page
View gist:960005
var express = require('express'),
connect = require('connect'),
fs = require('fs'),
http = require('http'),
url = require('url'),
sys = require('sys'),
wwwdude = require('wwwdude'),
locker = require('../../Common/node/locker.js'),
lfs = require('../../Common/node/lfs.js');
View gist:967175
[20:44:31][Twitter Account][ERROR]
[20:44:31][Twitter Account][ERROR] node.js:134
[20:44:31][Twitter Account][ERROR] throw e; // process.nextTick error, or 'error' event on first tick
[20:44:31][Twitter Account][ERROR] ^
[20:44:31][Twitter Account][ERROR] Error: Cannot find module '/home/channam/Code/Locker/Connectors/Twitter/client.js'
at Function._resolveFilename (module.js:320:11)
View gist:974446
{% for interface in interfaces %}
{% if interface['auto-up'] is defined %}{% if interface['auto-up'] in ('yes', 'true', 'on') %}auto {{ interface.name }}{% endif %}{% endif %}
iface {{ interface.name }} inet {{ interface.type }}
{% if interface.address is defined %} address {{ interface.address }}{% endif %}
{% if interface.gateway is defined %} gateway {{ interface.gateway }}{%- endif -%}
{% endfor %}
@bassdread
bassdread / gist:1164543
Created Aug 23, 2011 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away
View gist:1164543
Day job:
Python Dev
Favorite Python project:
App Engine
Favorite Conference:
DIBI
Python Experience Level:
View gist:1173201
for infile in glob.glob( os.path.join(pathname, '*.dll') ):
pe = pefile.PE(infile, fast_load=True)
f.write("\n" + str(infile))
if pe.OPTIONAL_HEADER.DATA_DIRECTORY[pefile.DIRECTORY_ENTRY['IMAGE_DIRECTORY_ENTRY_IMPORT']].VirtualAddress == 0:
print "nope"
else:
pe.parse_data_directories(directories=[pefile.DIRECTORY_ENTRY['IMAGE_DIRECTORY_ENTRY_IMPORT']])
for entry in pe.DIRECTORY_ENTRY_IMPORT:
f.write("\n".join(child_dll))
f.close()
View gist:1174174
26 Aug 20:09:14 - error: [Foursquare Account friends]
26 Aug 20:09:14 - error: [Foursquare Account friends] /home/channam/Code/Locker/Connectors/foursquare/friends.js:38
26 Aug 20:09:14 - error: [Foursquare Account friends] var userID = self.id;
26 Aug 20:09:14 - error: [Foursquare Account checkins]
26 Aug 20:09:14 - error: [Foursquare Account friends] ^
View gist:1184374
31 Aug 19:22:49 - debug: Firing event to links to /events
31 Aug 19:22:49 - debug: Firing event to places to /events
31 Aug 19:22:49 - debug: Firing an event for timeline/twitter from synclet/twitter action(new)
31 Aug 19:22:49 - debug: Firing event to links to /events
31 Aug 19:22:49 - debug: Firing event to places to /events
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: socket hang up
View gist:1184482
31 Aug 19:21:01 - debug: Firing event to links to /events
31 Aug 19:21:03 - info: [Locker] Synclet recent starting for foursquare
31 Aug 19:21:05 - info: [Locker] Synclet recent finished for foursquare
31 Aug 19:21:18 - info: [Locker] Having to spawn links
31 Aug 19:21:18 - info: [Locker] spawning into: /home/channam/Code/Locker/Me/links
31 Aug 19:21:18 - info: [Locker] sending links startup info of {"port":18054,"sourceDirectory":"/home/channam/Code/Locker/Collections/Links","workingDirectory":"/home/channam/Code/Locker/Me/links","lockerUrl":"http://localhost:8042","externalBase":"http://localhost:8042/Me/links/","mongo":{"host":"localhost","port":27018,"collections":["link","encounter"]}}
31 Aug 19:21:18 - info: [Locker] Proxy complete
31 Aug 19:21:18 - info: [Locker] Having to spawn links
31 Aug 19:21:18 - info: [Locker] links is still spawning, adding callback to queue.
31 Aug 19:21:18 - info: [Locker] Proxy complete
View gist:1204542
>>> f = open('tmp.ls', 'w')
>>> f
<open file 'tmp.ls', mode 'w' at 0x1a899c0>
>>> p = Popen(args,stdout=f)
>>> p
<subprocess.Popen object at 0x1af5190>
>>> f.close()
You can’t perform that action at this time.