Skip to content

Instantly share code, notes, and snippets.

View c0nstantine's full-sized avatar

Constantine Margiev c0nstantine

View GitHub Profile
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "NewsArticle",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://www.demasiadobueno.com/rescate-2541090758.html"
},
"url": "https://www.demasiadobueno.com/rescate-2541090758.amp.html",
"headline": "Este perrito fue rescatado de morir congelado",
--- a/static/js/utils/post_helper.js
+++ b/static/js/utils/post_helper.js
@@ -26,7 +26,7 @@ define(function (require) {
},
prependSocialTeaserImageKey: function (collection) {
return _.reduce(collection, function(res, value, key) {
- res['social_teaser_image' + key] = value;
+ res['social_teaser_image' + key === 'origin' ? '' : key] = value;
return res;
}, {});
<div class="pb_feed" data-comments="false" data-cover-screen="true" data-embed-by="de122724-7357-4e33-adec-4a106be4af89" data-game-info="false" data-item="4d443879-2290-4bf3-ba8e-7cf055e48189" data-recommend="false" element-index="0"></div>
diff --git a/roar/posts/__init__.py b/roar/posts/__init__.py
index 562e1ee..08c0e06 100644
--- a/roar/posts/__init__.py
+++ b/roar/posts/__init__.py
@@ -71,7 +71,7 @@ class PostDict(collections.Mapping):
from_field='social_teaser_image_id', crops_field='social_teaser_manual_image_crops'
),
- 'video_provider': service.DetermineVideoProvider(),
+ # 'video_provider': service.DetermineVideoProvider(),
$ git diff
diff --git a/static/js/utils/new_edit_mode_helpers.js b/static/js/utils/new_edit_mode_helpers.js
index 0493e82..ef024e8 100644
--- a/static/js/utils/new_edit_mode_helpers.js
+++ b/static/js/utils/new_edit_mode_helpers.js
@@ -63,6 +63,7 @@ define(function (require) {
'450x450': '',
'980x': '',
'image_caption': '',
+ 'image_external': '',
diff --git a/static/js/libs/require/plugins/css/css-builder.js b/static/js/libs/require/plugins/css/css-builder.js
index 01f18cd..b8e6043 100644
--- a/static/js/libs/require/plugins/css/css-builder.js
+++ b/static/js/libs/require/plugins/css/css-builder.js
@@ -29,6 +29,7 @@ define(['require', 'libs/require/plugins/css/normalize'], function(req, normaliz
css = csso.justDoIt(css);
}
catch(e) {
+ console.log('==ERROR==', css, css.length);
console.log('Compression failed due to a CSS syntax error.');
diff --git a/engine/runner/templates/dashboard/new_design_tool.html b/engine/runner/templates/dashboard/new_design_tool.html
index c1a70bd..030847f 100644
--- a/engine/runner/templates/dashboard/new_design_tool.html
+++ b/engine/runner/templates/dashboard/new_design_tool.html
@@ -3,10 +3,12 @@
{% block title %}
{{ site_name }} - dashboard
{% endblock %}
+
+{% block styles %}
In [38]: from django.utils.html import strip_tags
In [39]: strip_tags(None)
Out[39]: u'None'
In [40]: post = {'brief': None}
In [41]: strip_tags(post.get('brief', ''))
Out[41]: u'None'
>>> hr = BeautifulSoup('<p>first</p><hr><p>second</p><p>third</p>', 'html.parser')
>>> hr2 = BeautifulSoup('<p>first</p><hr/><p>second</p><p>third</p>', 'html.parser')
>>>
>>> for p in hr.find_all('p'):
... p.insert_after(hr.new_string('<div class="ad"></div>'))
...
>>> for p in hr2.find_all('p'):
... p.insert_after(hr2.new_string('<div class="ad"></div>'))
...
>>>
onstantine-prodtest/static/"
cp: cannot access ‘/mnt/local/tmp/deploy-2017-04-06-20-55-43-roman/static/js-build’: Permission denied
Fatal error: local() encountered an error (return code 1) while executing 'sudo -H -u deploys_debug /bin/bash -c "ssh deploys_debug@wfe-test2 cp -a /mnt/local/tmp/deploy-2017-04-06-20-55-43-roman/static/*-build /mnt/local/tmp/deploy-2017-04-06-2154-constantine-prodtest/static/"'
Aborting.
[localhost] local: rm /tmp/rebelmouse2.lock
rm: cannot remove ‘/tmp/rebelmouse2.lock’: No such file or directory
Warning: local() encountered an error (return code 1) while executing 'rm /tmp/rebelmouse2.lock'