Skip to content

Instantly share code, notes, and snippets.

View hsleewis's full-sized avatar
🔥

Harold hsleewis

🔥
View GitHub Profile

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@hsleewis
hsleewis / global.js
Last active July 27, 2022 08:27 — forked from PaulvdDool/global.js
Line item properties in Dawn theme for Bundles app
// in class VariantSelects
// in onVariantChange() method add the call the following method
this.updateBundleVariant();
// right after onVariantChange() define the method
updateBundleVariant() {
// remove old line item properties from DOM
[ ...document.querySelectorAll( '.bundles_lineItemProperty' ) ].forEach( lineItemProperty => {
lineItemProperty.parentNode.removeChild( lineItemProperty );
} );
@hsleewis
hsleewis / line_item_properties_with_variants snippet
Last active January 3, 2019 17:16
line item properties with variants example
THIS DOES NOT WORK FOR ALL THEMES
====
STEP 1: add this right above the </body> tag of your product template:
====
<div id="bundles_child_products" style="display:none;">
{% for variant in product.variants %}
{% if variant.metafields.bundles_app.content.size > 0 %}
<span id="bundle_{{variant.id}}" data-json='{{ variant.metafields.bundles_app.content | json}}'>
{% endif %}
server {
listen 80;
server_name ^(?<realservername>pre.+\.domain\.tld)$;
return 301 https://$realservername$request_uri;
}

Setting up a SSL Cert from Comodo

These are the steps I went through to set up an SSL cert.

Purchase the cert

Prior to purchasing a cert, you need to generate a private key, and a CSR file (Certificate Signing Request). You'll be asked for the content of the CSR file

Verifying that +hsl is my openname (Bitcoin username). https://onename.io/hsl
var run = require('gulp-run');
var upload_to_shopify = function( file ){
var splitPath = file.path.split('theme/').pop();
run('theme upload ' + splitPath, { cwd: 'theme' }).exec();
};
gulp.task( 'watch', function( evnt ) {
@hsleewis
hsleewis / git_clone_as_new
Created August 22, 2014 11:33
clone git repo
cd $HOME
git clone --bare url-to-base-repo repo
cd repo
git push --mirror url-to-new-repo
cd ..
rm -rf repo
// example1: ACTIVE AND HOVER STATE
a.error {
border: 1px solid #c6c6c6;
color: white;
&:hover {
background: #FA4549;
}
{% unless shop.enabled_payment_types == empty %}
<h4 class="text-center">Accepted Payments</h4>
<ul class="inline-list payment-icons text-center">
{% for type in shop.enabled_payment_types %}
<li>
<span class="icon-fallback-text">
<span class="icon icon-{{type}}" aria-hidden="true"></span>
<span class="fallback-text">{{type | replace: '_',' '}}</span>
</span>
</li>