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
clean_pyc() { | |
find . -name \*.pyc -delete | |
find . -name __pycache__ -exec rm -rf "{}" \; 2> /dev/null | |
} | |
on_write() { | |
while inotifywait --exclude .git -qre modify . | |
do | |
#eval "$@" | |
eval "${@/&&/&& ogg123 --quiet /usr/share/sounds/freedesktop/stereo/bell.oga &&}" |
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
[00:17.00]I'm sorry, | |
[00:19.00]but I don't want to be an emperor, | |
[00:21.00]that's not my business. | |
[00:23.00]We have developed speed but we have shut ourselves in. | |
[00:27.00]Machinery that gives abundance has left us in want. | |
[00:30.00]Our knowledge has made us cynical, our cleverness hard and unkind. | |
[00:34.00]We think too much | |
[00:35.00]and feel too little. | |
[00:37.00]More than machinery | |
[00:38.00]we need humanity. |
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 import webdriver | |
from time import sleep | |
foo = webdriver.Firefox() | |
foo.get('https://rawgithub.com/medwards/salad/master/salad/tests/html/browser/element_waiter.html') | |
sleep(20) | |
element = foo.find_element_by_id('appear') | |
print "Element returned had attribute myattr with value %s when it should be %s" % (element.get_attribute('myattr'), 'you') | |
foo.quit() |
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
<html> | |
<body id="test"> | |
<div id="element" style="display: none">foobar</div> | |
<a href="#" onclick="triggerMe(); return false;">reveal</a> | |
<a href="#" onclick="triggerMeToo(); return false;">wipe</a> | |
<script type="text/javascript"> | |
function triggerMe() { | |
document.getElementById("element").style.display = 'block'; | |
} |
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 add_foos(stuff): | |
for thing in stuff: | |
thing['foo'] = float(thing['id']) * 2.0 | |
return stuff | |
class ConnectorThing(object): | |
result_enricher = add_foos | |
def get_results(self): | |
# do something | |
bar = [{'id': 1}, {'id': 2}, {'id': 3}] |
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 import webdriver | |
from time import sleep | |
foo = webdriver.Firefox() | |
foo.get('file:///tmp/is_displayed_bug.html') | |
sleep(5) | |
element = foo.find_element_by_id('loading_status') | |
print "Element returned was %s with visibility equal to %s" % (element.text, | |
element.is_displayed()) | |
foo.quit() |
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
<html> | |
<body> | |
<div id="ready_status" style="display: none"> | |
Ready! | |
</div> | |
<div id="loading_status" style="overflow: hidden"> | |
Loading.... | |
</div> | |
<div id="something" style="display: none"></div> | |
<script type="text/javascript"> |
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
diff --git a/tests/async_finder.py b/tests/async_finder.py | |
index f26dc1a..7bf7265 100644 | |
--- a/tests/async_finder.py | |
+++ b/tests/async_finder.py | |
@@ -3,7 +3,7 @@ | |
# Copyright 2012 splinter authors. All rights reserved. | |
# Use of this source code is governed by a BSD-style | |
# license that can be found in the LICENSE file. | |
- | |
+from time import sleep |
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 subprocess | |
def print_output(command): | |
try: | |
subprocess.check_output(command, shell=0) | |
except subprocess.CalledProcessError as e: | |
print e.output | |
print_output(['echo', 'bleh']) |
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 ourapp.app import app | |
import unittest | |
from nose.tools import assert_equals | |
class BlueprintTestCase(unittest.TestCase): | |
def setUp(self): | |
pass | |
def tearDown(self): | |
pass |