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
with make_temp_dir(listing_id) as tmpdir: | |
logger.console('Downloading assets for %s to %s' % (listing_id, tmpdir)) | |
photoset = photos.Photoset(filenames, tmpdir, limit=MAXIMUM_PHOTOS, subprocessor=logged_popen) | |
photoset.load() | |
if photoset.count() < MINIMUM_PHOTOS: | |
raise RuntimeWarning('Too few conforming photos') | |
photoset.process() |
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
<?php | |
/** | |
* An immutable value object. | |
*/ | |
final class ImmutableObject | |
{ | |
private $state = array(); |
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
// Only need this for pushState enabled browsers | |
if (Backbone.history && Backbone.history._hasPushState) { | |
var $document = $(window.document); | |
var openLinkInTab = false; | |
// Links like <a href="some/thing/here"> are relative to the page. | |
// We want to run these links thru the router | |
var is_relative_to_page = function(href) { | |
return href.match(/^\/|(http:|https:|ftp:|mailto:|javascript:)/) === null; | |
}; |
NewerOlder