Skip to content

Instantly share code, notes, and snippets.

View jarvisjohnson's full-sized avatar

Jarvis Johnson jarvisjohnson

View GitHub Profile
@wbotelhos
wbotelhos / clear-sidekiq-jobs.sh
Last active October 23, 2024 14:10
Clear Sidekiq Jobs
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
@6temes
6temes / fb_sdk.js
Last active October 22, 2019 18:38
Compatibility between Facebook Plugin and Turbolinks 5
// FacebookSDK
// https://developers.facebook.com/docs/plugins/page-plugin/
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.8";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk')); // Replace 'facebook-jssdk' with your page id.
@ayamflow
ayamflow / gist:b602ab436ac9f05660d9c15190f4fd7b
Created May 9, 2016 19:10
Safari border-radius + overflow: hidden + CSS transform fix
// Add on element with overflow
-webkit-mask-image: -webkit-radial-gradient(white, black);
@thisislawatts
thisislawatts / index.liquid
Created May 31, 2015 15:45
Shopify - Adding a slideshow to the homepage
{% if settings.homepage_slideshow %}
<section id="HomepageSlideshow" class="homepage--slideshow">
<ul class="slides">
{% if settings.homepage_slide_show_1 %}
<li data-id="1">
<img src="{{ 'homepage_slide_image_1.jpg' | asset_url }}" alt="{{ settings.homepage_slide_title_1 }}"/>
<a href="{{ settings.homepage_slide_title_1 }}" class="vac">
<h1>{{ settings.homepage_slide_title_1 }}</h1>
<h2>{{ settings.homepage_slide_text_1 }}</h2>
</a>
@Chrisedmo
Chrisedmo / filter-vendor.liquid
Created July 31, 2012 11:14
Shopify: Filter by Vendor
<!-- add the vendor as product tag to product then use this code in collection.liquid -->
<!-- if we are on a collection page that is either custom or smart -->
{% if collection.url != blank %}
<h4>Shop by vendor:</h4>
<ul>
{% for product_vendor in collection.all_vendors %}
<li>
{% if current_tags contains product_vendor %}
<a class="active" href="{{ collection.url }}">{{ product_vendor }}</a>
{% else %}