| #See: http://daringfireball.net/2010/07/improved_regex_for_matching_urls | |
| import re, urllib | |
| GRUBER_URLINTEXT_PAT = re.compile(ur'(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))') | |
| for line in urllib.urlopen("http://daringfireball.net/misc/2010/07/url-matching-regex-test-data.text"): | |
| print [ mgroups[0] for mgroups in GRUBER_URLINTEXT_PAT.findall(line) ] | |
| repo for a more modern version of qt (4.7) | |
| http://atrpms.net/documentation/install/ | |
| http://packages.atrpms.net/dist/el5/qt4/ | |
| cat /etc/yum.repos.d/atrpms.repo | |
| [atrpms] | |
| name=ATrpms manual | |
| baseurl=http://dl.atrpms.net/el5-$basearch/atrpms/testing/ | |
| gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms |
| (function(window,undefined){ | |
| // Prepare our Variables | |
| var | |
| document = window.document, | |
| $ = window.jQuery; | |
| // Wait for Document | |
| $(window).bind(function(){ | |
| // Prepare Variables |
| :+1: | |
| :-1: | |
| :airplane: | |
| :art: | |
| :bear: | |
| :beer: | |
| :bike: | |
| :bomb: | |
| :book: | |
| :bulb: |
| /* from http://code.google.com/p/httperf/issues/detail?id=1 */ | |
| Index: configure.ac | |
| =================================================================== | |
| --- configure.ac (revision 132) | |
| +++ configure.ac (working copy) | |
| @@ -83,6 +83,8 @@ | |
| AC_FUNC_VPRINTF | |
| AC_CHECK_FUNCS([getopt_long]) | |
| import itertools | |
| import boto | |
| ec2 = boto.connect_ec2() | |
| chain = itertools.chain.from_iterable | |
| existing_instances = list(chain([res.instances for res in ec2.get_all_instances()])) | |
| print existing_instances #gives you a list of all instances | |
#Four Ways To Do Pub/Sub With jQuery and jQuery UI (in the future)
Between jQuery 1.7 and some of work going into future versions of jQuery UI, there are a ton of hot new ways for you to get your publish/subscribe on. Here are just four of them, three of which are new.
(PS: If you're unfamiliar with pub/sub, read the guide to it that Julian Aubourg and I wrote here http://msdn.microsoft.com/en-us/scriptjunkie/hh201955.aspx)
##Option 1: Using jQuery 1.7's $.Callbacks() feature:
| from selenium.common.exceptions import NoSuchElementException, TimeoutException | |
| class DomHelper(object): | |
| driver = None | |
| waiter = None | |
| def open_page(self, url): | |
| self.driver.get(url) |