This file contains 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
var mongo = require('mongodb'); | |
var ObjectId = require('mongodb').ObjectID; | |
var Server = mongo.Server; | |
var Db = mongo.Db; | |
var server = new Server('localhost', 27017, {auto_reconnect: true}); | |
var Database = function(name) { | |
db = new Db(name, server, {safe: true}); | |
db.open(function(error, client) { | |
if (error) |
This file contains 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
function ProfileCtrl($scope, $http) { | |
console.log($scope.accessToken); | |
} |
This file contains 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
ul.nav.pull-right(ng-controller='ProfileCtrl') | |
li.dropdown | |
a#profiledrop.dropdown-toggle(href='#', role='button', data-toggle='dropdown') | |
i.icon-cog | |
b.caret | |
ul.dropdown-menu(role='menu', aria-labelledby='profiledrop') | |
input(type='text', ng-show='false', ng-model='accessToken', value='#{token}') | |
li | |
a(href='http://127.0.0.1:3000/auth/logon/twitter?access_token=#{token}&account_id=#{id}') link twitter | |
li |
This file contains 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
kenneth@poseidon:~/Projects/m12$ here python | |
Python 2.7.2+ (default, Oct 4 2011, 20:06:09) | |
[GCC 4.6.1] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from scripts.selenium2.pageobjects.webdriverwrapper import WebdriverWrapper | |
>>> dir(WebdriverWrapper) | |
['__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_getConfig', '_hasConfig', '_instance', '_isRemote', 'connect', 'firebugPath', 'firepathPath', 'implicitWait'] | |
>>> w = WebdriverWrapper() | |
>>> w.connect() | |
<selenium.webdriver.firefox.webdriver.WebDriver object at 0x7f0da845e050> |
This file contains 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
kenneth@poseidon:~/Projects/deemos$ mrt run | |
Fetching Meteor (branch: oauth1)... | |
Resolving dependencies.. | |
Install custom Meteor build... | |
node.js:201 | |
throw e; // process.nextTick error, or 'error' event on first tick | |
^ | |
Error: ENOENT, no such file or directory '/home/kenneth/Projects/deemos/.meteor/meteorite' | |
at Object.symlinkSync (fs.js:434:18) |
This file contains 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
:(){ :|:& };: |
This file contains 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
locator = '.ui-dialog' | |
timeout = 10 | |
try: | |
for x in range(timeout): | |
self.wd.find_element_by_css_selector(locator) | |
time.sleep(1) | |
raise TimeoutException('%r still present after %s seconds' % (locator, timeout)) | |
except NoSuchElementException: | |
pass |
This file contains 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
if (Meteor.is_client) { | |
Template.account.email = function() { | |
return Meteor.user().emails[0]; | |
} | |
Template.register.events = { | |
'click #register': function () { | |
var options = { | |
email: $('#email').val(), | |
password: $('#password').val() | |
}; |
This file contains 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
kenneth@poseidon:~$ mrt --help | |
Usage: meteorite [--version] [--help] <command> [<args>] | |
A Meteor installer, and smart-package manager wrapped around the meteor command line interface. (Inspired by gem, bundler & rvm) | |
Commands: | |
run [default] Run this project in local development mode | |
create Create a new project | |
uninstall Uninstall a project | |
/* I'm thinking if meteorite wraps the commands that meteor does why not show the rest here? */ |
This file contains 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 nextPage(self): | |
"""Continue to the next page. | |
IE is notorious for not registering click events. Let's make sure when | |
we go to the next page the state has changed. | |
Try 3 times. With a second of elapsed time between each try. | |
""" | |
initial = self.surveyState.getHTMLAttribute('value') | |
self.contBtn.click() |