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
| from selenium.common.exceptions import NoSuchElementException, TimeoutException | |
| class DomHelper(object): | |
| driver = None | |
| waiter = None | |
| def open_page(self, url): | |
| self.driver.get(url) |
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
| import unittest | |
| import datetime | |
| from sys import * | |
| from selenium import webdriver | |
| from selenium.webdriver.support.ui import WebDriverWait | |
| import login_dom | |
| class BaseTests(unittest.TestCase): |
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
| var navigator = window.navigator || {}; | |
| navigator.camera = (function() { | |
| function resizeImage(img, maxHeight, maxWidth) { | |
| var ratio = maxHeight/maxWidth; | |
| if (img.height/img.width > ratio){ | |
| // height is the problem | |
| if (img.height > maxHeight){ | |
| img.width = Math.round(img.width*(maxHeight/img.height)); | |
| img.height = maxHeight; |
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
| ISTOUCHING = false; | |
| function useTouchEvents() { | |
| return isTouchDevice(); | |
| } | |
| function triggerClick(dom) { | |
| if (useTouchEvents()) { | |
| dom.trigger('tap'); | |
| } else { |
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
| import urllib | |
| import logging | |
| import base64 | |
| from httplib2 import Http | |
| API_URL = 'http://superfeedr.com/hubbub' | |
| MODE_SUBSCRIBE = 'subscribe' | |
| MODE_UNSUBSCRIBE = 'unsubscribe' | |
| MODE_RETRIEVE = 'retrieve' |
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
| import unittest | |
| from sys import * | |
| import os | |
| from selenium import webdriver | |
| from selenium.webdriver.support.ui import WebDriverWait | |
| from selenium.common.exceptions import NoSuchElementException, TimeoutException | |
| class QUnitTests(unittest.TestCase): | |
| driver = None |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width" /> | |
| <meta name="apple-mobile-web-app-capable" content="yes" /> | |
| <title>everyday.io</title> | |
| {% if g and g.debug %} | |
| <link rel="stylesheet" href="css/colorslider.css" /> | |
| <link rel="stylesheet" href="css/dateinput.css" /> | |
| <link rel="stylesheet" href="css/bootstrap-1.3.0.min.css"> |
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
| import sys | |
| sys.path.append('/Library/Python/2.7/site-packages') | |
| from jinja2 import Environment, FileSystemLoader | |
| if __name__ == "__main__": | |
| env = Environment(loader=FileSystemLoader('application/templates/')) | |
| template = env.get_template('phonegap/index.html') | |
| print template.render(debug=False, mobile=True, native=True) |
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
| {% extends "yourbase.html" %} | |
| {% block subheader %} | |
| <div class="page-header"> | |
| <h1> | |
| <span id="log-date">{{ title }}</span> | |
| <a data-tooltip="Change the date" id="log-date-button" href="javascript:void(0);" style="margin-left: 10px;"><img src="img/calendar.png"></a> | |
| </h1> | |
| </div> | |
| {% endblock %} |
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
| MAKEFLAGS = --no-print-directory --always-make | |
| MAKE = make $(MAKEFLAGS) | |
| BUILDDIR = ./.build | |
| CLOSUREURL = http://closure-compiler.googlecode.com/files/compiler-latest.zip | |
| CLOSUREDIR = $(BUILDDIR)/closure | |
| CLOSUREFILE = $(CLOSUREDIR)/compiler.jar | |
| YUIURL = http://yui.zenfs.com/releases/yuicompressor/yuicompressor-2.4.6.zip | |
| YUIDIR = $(BUILDDIR)/yui |