This file contains hidden or 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 os | |
import pickle | |
import random | |
import sys | |
import beanstalkc | |
# Use *'s sparingly! |
This file contains hidden or 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 os | |
import pickle | |
import time | |
import beanstalkc | |
# Images are stored locally in 'images', and moved to 'original' when | |
# they have been passed to the queue |
This file contains hidden or 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
motoma@arbiter$ beanstalkd -d -b -l 0.0.0.0 -p 11300 |
This file contains hidden or 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
running = False | |
try: | |
# We first connect to the bridge running on port 18293. | |
bridge_server = socket.socket() | |
bridge_server.connect(('my.public.server.addr', 18293)) | |
print("Connected to Bridge") | |
# Then we wait for incoming data. | |
data = bridge_server.recv(1024) |
This file contains hidden or 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
running = False | |
try: | |
# In this example, we bridge over port 18293 | |
listener = socket.socket() | |
listener.bind(('0.0.0.0', 18293)) | |
listener.listen(1) | |
bridge_client = listener.accept()[0] | |
listener.close() | |
print("Bridge Client Connected.") |
This file contains hidden or 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
def learn(self, user, msg): | |
global factoids, substitutions | |
msg = msg.strip() | |
if msg[0] == '[' and ']' in msg[6:]: | |
epos = msg.find(']') | |
token = msg[1:epos] | |
body = msg[epos + 1:] | |
if not factoids.has_key(token): | |
factoids[token] = [] | |
factoids[token].append(body.strip()) |
This file contains hidden or 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
Welcome to the Gumstix Linux Distribution! | |
gumstix login: root | |
Password: | |
Don't eat me! | |
# |
This file contains hidden or 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
GUM>loady a2000000 | |
*In HyperTerminal: Transfer->Send File->uImage with Ymodem protocol* | |
GUM>katinstall 100000 | |
GUM>katload 100000 | |
GUM>bootm |
This file contains hidden or 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
GUM>loady a2000000 | |
*In HyperTerminal: Transfer->Send File->rootfs_arm_nofpu.jffs2 with Ymodem protocol* | |
GUM>pro on 1:0-1 && jera all && cp.b a2000000 40000 ${filesize} |
This file contains hidden or 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
GUM>loadb a2000000 | |
*In HyperTerminal: Transfer->Send File->u-boot.bin with Kermit protocol* | |
GUM>protect off all | |
GUM>era 1:0-1 | |
GUM>cp.b a2000000 0 ${filesize} | |
GUM>reset |