Skip to content

Instantly share code, notes, and snippets.

View Shine18's full-sized avatar
πŸ‘¨β€πŸ’»
I engineer revenue systems from $0 to $1Ms+ MRR

Aakash Ahmed Shine18

πŸ‘¨β€πŸ’»
I engineer revenue systems from $0 to $1Ms+ MRR
View GitHub Profile
@Shine18
Shine18 / gist:cf7b5f79f1971d5fed8f795fa28454ee
Last active October 30, 2023 13:53
Solution for "cannot load such file -- openssl" on RVM
When i tried to install any ruby version, I got error
Error running '__rvm_make install',
please read /Users/shine18/.rvm/log/1698671652_ruby-2.7.6/install.log
There has been an error while running make install. Halting the installation.
Problem: It tries to load openssl@1 which is superseded by openssl@3
Solution:
@Shine18
Shine18 / gist:09d496fb2d575c30642cf6dbdc1e1c30
Created March 7, 2021 06:37 — forked from carolineschnapp/gist:5397337
Sample JavaScript file added with ScriptTag resource. This sample file is meant to teach best practices. Your app will load jQuery if it's not defined. Your app will load jQuery if jQuery is defined but is too old, e.g. < 1.7.
/* Sample JavaScript file added with ScriptTag resource.
This sample file is meant to teach best practices.
Your app will load jQuery if it's not defined.
Your app will load jQuery if jQuery is defined but is too old, e.g. < 1.7.
Your app does not change the definition of $ or jQuery outside the app.
Example: if a Shopify theme uses jQuery 1.4.2, both of these statements run in the console will still return '1.4.2'
once the app is installed, even if the app uses jQuery 1.9.1:
jQuery.fn.jquery => "1.4.2"
$.fn.jquery -> "1.4.2"
*/
@Shine18
Shine18 / currencies.liquid
Created November 28, 2020 18:11 — forked from carolineschnapp/currencies.liquid
currencies.liquid
{% if settings.show_multiple_currencies %}
{{ "//cdn.shopify.com/s/javascripts/currencies.js" | script_tag }}
{{ "jquery.currencies.min.js" | asset_url | script_tag }}
<script>
Currency.format = '{{ settings.currency_format | default: 'money_with_currency_format' }}';
var shopCurrency = '{{ shop.currency }}';
@Shine18
Shine18 / gist:fa302a4f75e9ecd76294ac16be38e2e3
Created May 31, 2020 11:07 — forked from tyteen4a03/gist:3420a9e121d13b091343
Shopify handleize function in JavaScript
// from https://github.com/Shopify/liquid/blob/63eb1aac69a31d97e343822b973b3a51941c8ac2/performance/shopify/shop_filter.rb#L100
Shopify.handleize = function (str) {
str = str.toLowerCase();
var toReplace = ['"', "'", "\\", "(", ")", "[", "]"];
// For the old browsers
for (var i = 0; i < toReplace.length; ++i) {
str = str.replace(toReplace[i], "");
}
{% unless template == 'index' or template == 'cart' or template == 'list-collections' or template == '404' %}
{% assign t = template | split: '.' | first %}
<nav class="breadcrumbs" role="navigation" aria-label="breadcrumbs">
<ol>
<li>
<a href="/" title="Home">Home</a>
</li>
@Shine18
Shine18 / url_slug.php
Last active August 29, 2015 14:14 — forked from sgmurphy/url_slug.php
<?php
/**
* Create a web friendly URL slug from a string.
*
* Although supported, transliteration is discouraged because
* 1) most web browsers support UTF-8 characters in URLs
* 2) transliteration causes a loss of information
*
* @author Sean Murphy <sean@iamseanmurphy.com>
* @copyright Copyright 2012 Sean Murphy. All rights reserved.