Skip to content

Instantly share code, notes, and snippets.

View thevrus's full-sized avatar
🌎
Work from Earth

Vadim Rusin thevrus

🌎
Work from Earth
View GitHub Profile
@thevrus
thevrus / wishlist.md
Created July 6, 2024 15:28 — forked from panoply/wishlist.md
Client Slide Wishlist for Shopify

Usage

The function invokes as an IIFE and is exposed in global scope (i.e, window.wishlist or simply, wishlist). This means that you simply drop it in via <script>. It provides several methods for usage. By default, it will not do anything until you wire it up. Firstly, let me explain the main methods:

// use render method to optionally create a virtual wishlist, more on this later
wishlist.render((product) => `<a href="#"><img class="img" src="${product.img}"></a>`);

// If you need to listen for wishes
wishlist.on('wished', (args) =&gt; console.log(args));
@thevrus
thevrus / unreset.css
Created November 18, 2023 00:49
Tailwind’s CSS Reset wrapper
.unreset {
a {
@apply underline;
}
p {
@apply my-4;
}
blockquote,
figure {
function (user, context, callback) {
if (
context.clientMetadata &&
context.clientMetadata.shopify_domain &&
context.clientMetadata.shopify_multipass_secret
) {
const RULE_NAME = "shopify-multipasstoken";
const CLIENTNAME = context.clientName;
const BLOCK_SIZE = 16;
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
@thevrus
thevrus / .zshrc
Last active October 9, 2021 15:49
alias cp='cp -iv' # Preferred 'cp' implementation
alias mv='mv -iv' # Preferred 'mv' implementation
alias mkdir='mkdir -pv' # Preferred 'mkdir' implementation
alias ll='ls -FGlAhp' # Preferred 'ls' implementation
alias ls='ls -G'
cd() { builtin cd "$@"; ls; } # Always list directory contents upon 'cd'
alias cd..='cd ../' # Go back 1 directory level (for fast typers)
alias ..='cd ../' # Go back 1 directory level
alias ...='cd ../../' # Go back 2 directory levels
alias .3='cd ../../../' # Go back 3 directory levels