Skip to content

Instantly share code, notes, and snippets.

View TodoViernesSMk's full-sized avatar

Santiago Vallejo TodoViernesSMk

View GitHub Profile
@TodoViernesSMk
TodoViernesSMk / gist:008877f42b1e18c6c077e32b2306ee17
Created February 4, 2021 02:04 — forked from wrburgess/gist:5528649
Backup Heroku Postgres database and restore to local database

Grab new backup of database

Command: heroku pgbackups:capture --remote production

Response: >>> HEROKU_POSTGRESQL_COLOR_URL (DATABASE_URL) ----backup---> a712

Get url of backup download

Command: heroku pgbackups:url [db_key] --remote production

@TodoViernesSMk
TodoViernesSMk / label-to-placeholder.js
Created January 19, 2021 15:25 — forked from makeusabrew/label-to-placeholder.js
Simple jQuery snippet to convert form labels into inline placeholders
$("form :input").each(function(index, elem) {
var eId = $(elem).attr("id");
var label = null;
if (eId && (label = $(elem).parents("form").find("label[for="+eId+"]")).length == 1) {
$(elem).attr("placeholder", $(label).html());
$(label).remove();
}
});
<div data-section-id="{{ section.id }}" id="mysection_{{ section.id }}" class="richtext-custom-section contain-full-width no-padding ">
{% for block in section.blocks %}
{% capture thecycle %}{% cycle 'odd', 'even' %}{% endcapture %}
{% if thecycle == 'odd' %}
<div class="odd_block">
<div class="one-half-custom odd_img ">
{% if block.settings.custom_image %}
<img src="{{ block.settings.custom_image | img_url: '2048x' }}" />
{%endif%}
@TodoViernesSMk
TodoViernesSMk / latest-blog-posts.css
Created August 26, 2020 15:21 — forked from Chrisedmo/latest-blog-posts.css
Shopify: Latest Blog Posts
.widget .latest-blog-posts-list {
margin: 0;
list-style: none;
}
.widget .latest-blog-posts-list li {
margin: 0 0 10px 0;
padding: 0 0 10px 0;
border-bottom: dotted 1px #CCC;
background: none;
word-wrap: break-word;