Skip to content

Instantly share code, notes, and snippets.

View markshust's full-sized avatar
🤓
Currently exploring building production apps with Claude Code & AI.

Mark Shust markshust

🤓
Currently exploring building production apps with Claude Code & AI.
View GitHub Profile
@markshust
markshust / bash.sh
Created February 15, 2021 20:19
Example of executing local bash script with curl
#!/bin/bash
curl -s "file:////Users/markshust/Sites/docker-magento/lib/template" | bash
@markshust
markshust / module.xml
Created July 10, 2021 17:39
Example of sharing a Gist
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Macademy_SomethingMoreComplex"/>
</config>
@markshust
markshust / checkout_index_index.xml
Last active August 2, 2024 21:43
app/code/Macademy/CheckoutMessages/view/frontend/layout/checkout_index_index.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="checkout" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<referenceBlock name="checkout.root">
<arguments>
<argument name="jsLayout" xsi:type="array">
<item name="components" xsi:type="array">
<item name="checkout" xsi:type="array">
<item name="children" xsi:type="array">
# Mark Shust's Docker Configuration for Magento
# (https://github.com/markshust/docker-magento)
#
# Version 40.0.0
version: "3"
services:
app:
image: markoshust/magento-nginx:1.18-5
@markshust
markshust / env.php
Created December 21, 2021 14:48
sample env.php file for existing magento installs
<?php
return [
'backend' => [
'frontName' => 'admin'
],
'remote_storage' => [
'driver' => 'file'
],
'queue' => [
'consumers_wait_for_messages' => 1,
@markshust
markshust / get-time-countdown.js
Created February 4, 2022 16:18
Netlify function for countdown timer to specific date, stores in Nuxt Vuex store
// Docs on event and context https://www.netlify.com/docs/functions/#the-handler-method
const handler = async () => {
try {
// Note that time will always show 5 hours longer than prod, that is normal & expected.
const dateFuture = new Date(new Date().getFullYear(), 1, 5, 5); // UTC is 5 hours ahead ET
const dateNow = new Date();
const seconds = Math.floor((dateFuture - (dateNow))/1000);
const minutes = Math.floor(seconds/60);
const hours = Math.floor(minutes/60);
const hoursMinutes = minutes - hours * 60
code[class*="language-"],
pre[class*="language-"] {
text-align: left;
word-spacing: normal;
word-wrap: normal;
color: #c3cee3;
background: #263238;
font-family: Hack, Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
font-size: 1.1em;
line-height: 1.6em;
@markshust
markshust / keybase.md
Created March 10, 2022 18:02
keybase.md

Keybase proof

I hereby claim:

  • I am markshust on github.
  • I am markshust (https://keybase.io/markshust) on keybase.
  • I have a public key ASAl4N1-B72cg7xyoNwDOiw6IiuhGbFYYi-8SssbIiA6owo

To claim this, I am signing this object:

@markshust
markshust / adobe-cloud-magerun-dev-console.sh
Created April 26, 2022 14:33 — forked from vbuck/adobe-cloud-magerun-dev-console.sh
Use N98-Magerun Dev Console in Adobe Cloud Environments
cd /tmp
curl -O https://files.magerun.net/n98-magerun2.phar
chmod +x ./n98-magerun2.phar
XDG_CONFIG_HOME="/tmp" ./n98-magerun2.phar dev:console --root-dir=$MAGENTO_CLOUD_DIR
@markshust
markshust / view\frontend\layout\default.xml
Created June 17, 2022 12:20
Add a JavaScript file to all pages of Magento with head.link node
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<link src="Foo_Bar::js/my-js-file.js"/>
</head>
</page>