Skip to content

Instantly share code, notes, and snippets.

View bassdread's full-sized avatar

bassdread

  • UK
View GitHub Profile
@bassdread
bassdread / gist:1208902
Created September 10, 2011 22:45
Python to change your desktop
#!/usr/bin/env python
import subprocess, sys, os
import os.path
import random
def octo_desktop(dirname):
"""Over see the swapping of the desktop"""
if os.path.isdir(dirname):
$ node lockerd.js
6181
16 Sep 13:01:55 - info: lservicemanager lockerPortNext = 18042
16 Sep 13:01:56 - info: Apps
16 Sep 13:01:56 - info: Collections
16 Sep 13:01:56 - info: ***** Should install collection messages
16 Sep 13:01:56 - info: ***** Should install collection search
16 Sep 13:01:56 - info: ***** Should install collection photos
16 Sep 13:01:56 - info: ***** Should install collection links
16 Sep 13:01:56 - info: ***** Should install collection videos
@bassdread
bassdread / gist:1225482
Created September 18, 2011 19:53
Error syncing with new flickr code.
18 Sep 20:51:19 - error: There was an error sending an event to photos at /events got 500
18 Sep 20:51:22 - error: DEBUG: got flickr photo 4711484737
18 Sep 20:51:22 - debug: Firing an event for photo/flickr from flickr action(new)
18 Sep 20:51:22 - debug: Firing event to photos to /events
18 Sep 20:51:22 - info: proxying POST /Me/photos/events to http://localhost:18045//events
18 Sep 20:51:22 - info: Proxy complete
18 Sep 20:51:22 - error: 18 Sep 20:51:22 - debug: Error processing: The flickr data was invalid
18 Sep 20:51:22 - error: There was an error sending an event to photos at /events got 500
@bassdread
bassdread / gist:1225450
Created September 18, 2011 19:31
Reoccurring Error
18 Sep 20:27:47 - error: QUEUE SIZE: 180
18 Sep 20:27:47 - info: Going to add http://www.nzherald.co.nz/nz/news/article.cfm?c_id=1&objectid=10752723
18 Sep 20:27:47 - error:
events.js:45
throw arguments[1]; // Unhandled 'error' event
^
18 Sep 20:27:47 - error: Error: EBADNAME, Misformatted domain name
@bassdread
bassdread / gist:1228877
Created September 20, 2011 11:15
Full Misformatted domain name Lof or ticket #216
20 Sep 12:09:52 - info: lservicemanager lockerPortNext = 18042
20 Sep 12:09:53 - info: Apps
20 Sep 12:09:53 - info: Collections
20 Sep 12:09:53 - info: ***** Should install collection messages
20 Sep 12:09:53 - info: ***** Should install collection search
20 Sep 12:09:53 - info: ***** Should install collection photos
20 Sep 12:09:53 - info: ***** Should install collection links
20 Sep 12:09:53 - info: ***** Should install collection videos
20 Sep 12:09:53 - info: ***** Should install collection places
20 Sep 12:09:53 - info: ***** Should install collection contacts
@bassdread
bassdread / gist:1229050
Created September 20, 2011 13:19
Another "Misformatted domain name" Error
20 Sep 14:17:08 - info: Added http://techcrunch.com/2011/09/19/leaked-photo-purportedly-shows-iphone-5s-insides-a5-processor-bigger-display-and-battery/
Going to add http://www.facebook.com/photo.php?v=2386349307986
20 Sep 14:17:08 - error: QUEUE SIZE: 0
20 Sep 14:17:08 - info: Added http://www.facebook.com/photo.php?v=2386349307986
20 Sep 14:17:08 - debug: Firing an event for home/facebook from synclet/facebook action(update)
20 Sep 14:17:08 - debug: Firing event to links to /events
20 Sep 14:17:08 - debug: Firing an event for home/facebook from synclet/facebook action(update)
$ npm install
npm ERR! Error: version not found: 1.0.27 : npm/1.0.27
npm ERR! at Request._callback (/usr/local/lib/node_modules/npm/lib/utils/npm-registry-client/request.js:180:12)
npm ERR! at Request.callback (/usr/local/lib/node_modules/npm/node_modules/request/main.js:99:22)
npm ERR! at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/main.js:361:18)
npm ERR! at Request.emit (events.js:64:17)
npm ERR! at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/main.js:327:16)
npm ERR! at IncomingMessage.emit (events.js:81:20)
npm ERR! at HTTPParser.onMessageComplete (http.js:133:23)
npm ERR! at CleartextStream.ondata (http.js:1227:22)
2 Dec 03:31:01 - info: spawning into: /home/channam/Code/Locker/Me/useui
TypeError: Cannot read property 'instance' of undefined
at Router.<anonymous> (/home/channam/Code/Locker/Ops/webservice.js:512:33)
at done (/home/channam/Code/Locker/node_modules/express/lib/router/index.js:250:22)
at middleware (/home/channam/Code/Locker/node_modules/express/lib/router/index.js:244:9)
at param (/home/channam/Code/Locker/node_modules/express/lib/router/index.js:227:11)
at pass (/home/channam/Code/Locker/node_modules/express/lib/router/index.js:232:6)
at Router._dispatch (/home/channam/Code/Locker/node_modules/express/lib/router/index.js:255:4)
at Object.handle (/home/channam/Code/Locker/node_modules/express/lib/router/index.js:45:10)
at next (/home/channam/Code/Locker/node_modules/connect/lib/http.js:201:15)
#!/usr/bin/python
import sys
import serial
import json
def main(device, load_json=False):
device_path = "/dev/{0}".format(device)
print "Opening {}".format(device_path)
import subprocess
import signal
import platform
class RaidMonitor:
def __init__(self, agentConfig, checksLogger, rawConfig):
self.agentConfig = agentConfig
self.checksLogger = checksLogger
self.rawConfig = rawConfig
# removes any Filesystem with Filesystem of none in df