Skip to content

Instantly share code, notes, and snippets.

View Birne94's full-sized avatar

Daniel Birnstiel Birne94

View GitHub Profile
@Birne94
Birne94 / b2b-contact.liquid
Created March 25, 2021 10:38
contact form setup
<div class="rich-text rich-text--{{ section.id }}" data-section-id="{{ section.id }}" data-section-type="rich-text">
<div class="grid page-width">
<div class="grid__item text-center{% unless section.settings.full_width %} medium-up--two-thirds medium-up--push-one-sixth{% endunless %}">
{% if section.settings.section_title != blank %}
<h2 class="rich-text__heading separator
{% if section.settings.text_size == 'large' %} h1{% elsif section.settings.text_size == 'small' %} h3{% endif %}"
data-animate>
{{ section.settings.section_title | escape }}
</h2>
{% endif %}
@Birne94
Birne94 / bulk_update_mappings.log
Created February 13, 2018 11:50
bulk_update_mappings.log
INFO:sqlalchemy.engine.base.Engine:UPDATE test_foo SET a=?, b=?, c=? WHERE test_foo.id = ?
INFO:sqlalchemy.engine.base.Engine:(('a', 'b', 'c', 1), ('a', 'b', 'c', 2), ('a', '', '', 3), ('a', '', '', 4), ('a', '', '', 5), ('', '', 'c', 6), ('a', 'b', '', 7), ('', '', 'c', 8) ... displaying 10 of 1000 total bound parameter sets ... ('', 'b', '', 999), ('a', 'b', 'c', 1000))
INFO:sqlalchemy.engine.base.Engine:UPDATE test_foo SET a=?, b=?, c=? WHERE test_foo.id = ?
INFO:sqlalchemy.engine.base.Engine:(('a', 'b', 'c', 1), ('a', 'b', 'c', 2))
INFO:sqlalchemy.engine.base.Engine:UPDATE test_foo SET a=? WHERE test_foo.id = ?
INFO:sqlalchemy.engine.base.Engine:(('a', 3), ('a', 4), ('a', 5))
INFO:sqlalchemy.engine.base.Engine:UPDATE test_foo SET c=? WHERE test_foo.id = ?
INFO:sqlalchemy.engine.base.Engine:('c', 6)
INFO:sqlalchemy.engine.base.Engine:UPDATE test_foo SET a=?, b=? WHERE test_foo.id = ?
INFO:sqlalchemy.engine.base.Engine:('a', 'b', 7)
var geocodingParams = {
searchText: string
};
var onResult = function (result) {
var locations = result.Response.View[0].Result,
position,
result = [];
// Add a marker for each location found
for (var i = 0; i < locations.length; i++) {
@Birne94
Birne94 / gist:06bb7dd3df2a6a44cc80
Created May 26, 2015 16:14
REPL Shortcut Injection
| exception |
[ #replay n:2 ]
on: MessageNotUnderstood
do: [:ex | exception := ex ].
message := (exception receiver asString) , ':', (exception message selector asString).
args := OrderedCollection new.
args add: #context.
args addAll: exception message arguments.