Skip to content

Instantly share code, notes, and snippets.

View thedaniel's full-sized avatar

Daniel Hengeveld thedaniel

View GitHub Profile
@thedaniel
thedaniel / gist:671830
Created November 11, 2010 01:30
uuughly
sudo mkdir /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/include
sudo cp /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Headers/* /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/include/
#in bashrc, not sure the /../ is right, i just set it to the above dir manually
export JAVA_HOME=$(/usr/libexec/java_home)/../
4:41
dawagner
thedaniel: Selenium currently interacts with the browser by way of a Chrome extension, and there's no guarantees over execution order of extension scripts
4:41
dawagner
This will be changing Real Soon Now
4:42
No Gecko sdk detected. Install xulrunner-dev to compile 64-bit Firefox extension.No srcs specified for selenium-core
** Invoke //rb:gem:build (first_time)
** Invoke build/selenium-webdriver-0.0.31.dev.gem (first_time)
** Invoke //rb:chrome (first_time)
** Invoke //rb:common (first_time)
** Execute //rb:common
Preparing: //rb:common in build/rb
** Invoke //rb:remote (first_time)
** Invoke //rb:common
** Execute //rb:remote
import subprocess
for i in range(0,1500):
subprocess.call("convert -size 1024x768 plasma: image-%i.jpg" % i, shell=True)
Global channel:
=============
[u'mr watson. come here. i need you.']
Named channel:
=============
[u'What hath Shark wrought?']
Subchannel:
=============
[u'Can you hear me now?']
Global channel:
=============
http://localhost:1337/session/6/channel/16
None
[u'mr watson. come here. i need you.']
Named channel:
=============
http://localhost:1337/session/6/channel/17
foo
[u'What hath Shark wrought?']
import spire
import requests
client = spire.Client('http://localhost:1337', key='1', async=False)
session = client.session()
print session.url
channel = session.channel()
channel.publish('mr watson. come here. i need you.')
session = client.session()
@thedaniel
thedaniel / gist:1720921
Created February 2, 2012 02:06
Spire capabilities 1
var Spire = require('spire.io.js');
var express = require('express');
if (!process.env.SPIRE_KEY){
console.log("You must set a SPIRE_KEY environment variable");
process.exit(1);
}
var spire = new Spire();
var clientSubscriptionData;
@thedaniel
thedaniel / gist:1721075
Created February 2, 2012 02:44
createAndAssign.js
spire.start(process.env.SPIRE_KEY, function(err, session) {
spire.channel(
'client-publishable-channel',
function(err, channel){
if (!err) {
clientPublishableChannelData = {url: channel.data.url, capability: channel.data.capability};
}
}
);