Skip to content

Instantly share code, notes, and snippets.

@shanselman
shanselman / ohmyposhv3.json
Created December 23, 2020 03:48
My ohMyPoshv3 json
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
@kellyvaughn
kellyvaughn / js-variables.liquid
Created December 9, 2020 16:38
JS Variables
/* ===== JS-VARIABLES.LIQUID (snippets/js-variables.liquid)
======================= */
{% capture js_variables %}
Shopify = window.Shopify || {};
{% comment %} /* # Theme settings
================================================== */ {% endcomment %}
Shopify.theme_settings = {};
@kellyvaughn
kellyvaughn / css-variables.liquid
Created December 9, 2020 16:37
CSS Variables
/* ===== CSS-VARIABLES.LIQUID (snippets/css-variables.liquid)
======================= */
<style>
{{ settings.headline__font | font_face }}
{{ settings.regular__font | font_face }}
{%- assign font_body_bold = settings.regular__font | font_modify: 'weight', 'bolder' -%}
{%- assign font_body_bold_italic = font_body_bold | font_modify: 'style', 'italic' -%}
{{ font_body_bold | font_face }}
{{ font_body_bold_italic | font_face }}
@jeromecoupe
jeromecoupe / package.json
Created December 2, 2020 10:30
Minimal NPM script Sass
{
"name": "sass-npm-scripts",
"version": "1.0.0",
"author": "Jérôme Coupé",
"description": "Minimal Sass NPM scripts",
"main": "index.js",
"scripts": {
"build:styles": "sass --style=compressed src/scss/:dist/css/",
"watch:styles": "onchange src/scss/**/*.scss -- npm run build:styles",
"watch": "npm-run-all --parallel watch:**",
<#
.SYNOPSIS
Output Windows Terminal color scheme JSON from a ColorTool .INI scheme
.DESCRIPTION
Until a new release of ColorTool that contains the update to output Windows Terminal JSON schemes it'll either need to be built locally or .INI schemes converted. This script accomplishes the convesrion of ColorTool .INI schemes for Windows Termianl.
.PARAMETER Path
Path to a ColorTool scheme .INI file
.LINK
https://github.com/microsoft/terminal
.LINK
@kellyvaughn
kellyvaughn / taproom-workflow.md
Created November 11, 2020 20:23
Taproom Workflow

Git & Github Process

Git and Gihub provide several benefits to the team and is an essential tool to The Taproom for collaboration and flexibility. Here are some of the guidelines we aim to follow:

  1. Utilize branches - While working on master, branches allow for more collaboration, conversation, and control around changes being made to the code. Commits directly to master should be limited to settings_data updates, client theme updates, typo fixes and emergency bug fixes.
@kellyvaughn
kellyvaughn / shipping-bar.liquid
Created October 1, 2020 18:01
KellyxKelly - Shipping Bar
{% assign threshold = section.settings.free-shipping-threshold | times: 100 %}
{% assign amount_remaining = threshold | minus: cart.items_subtotal_price %}
{% assign amount_remaining_money = amount_remaining | money %}
<div class="shipping-bar">
{% if amount_remaining <= 0 %}
<p>{{ section.settings.free-shipping-message }}</p>
{% else %}
<p>{{ section.settings.approaching-message | replace: '*', amount_remaining_money }}</p>
{% endif %}
@jeromecoupe
jeromecoupe / deploy.yaml
Last active August 2, 2023 16:41
Github actions: build and deploy Craft sites (WIP)
name: Craft CMS deployments
on:
push:
branches: [master]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"copyOnSelect": false,
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
// Add custom keybindings to this array.
// To unbind a key combination from your defaults.json, set the command to "unbound".
// To learn more about keybindings, visit https://aka.ms/terminal-keybindings
"keybindings":
[
// Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
@kellyvaughn
kellyvaughn / index-hero.liquid
Created September 13, 2019 17:56
Hero Video (with fallback image)
<div class="video-holder">
<video autoplay muted loop playsinline poster="{{ section.settings.image | img_url: '2000x', scale: 2 }}">
{% unless section.settings.video-mp4 == blank %}<source src="{{ section.settings.video-mp4 }}" type="video/mp4" />{% endunless %}
{% unless section.settings.video-ogg == blank %}<source src="{{ section.settings.video-ogg }}" type="video/ogg" />{% endunless %}
<img src="{{ section.settings.image | img_url: '2000x', scale: 2 }}" />
</video>
</div>
<div class="overlay"></div>
<div class="hero-content">