Skip to content

Instantly share code, notes, and snippets.

View ryanscherler's full-sized avatar

Ryan Scherler ryanscherler

View GitHub Profile
@renestalder
renestalder / storybook-6-twig.md
Last active August 4, 2023 11:25
Storybook 6 Twig Setup
  1. Install twigjs-loader via npm.

    $ npm i -D twigjs-loader
  2. Extend Storybook's Webpack config to use the Twig loader.

    main.js:

    module.exports = {
     stories: [
@daltonrooney
daltonrooney / app.js
Last active October 14, 2022 16:35
Craft CMS GQL query w/ filters and pagination
import Vue from 'vue'
import { debounce } from './utils/debounce';
import { ProCatalogCategoriesQuery } from './queries/proCatalogCategories.gql';
import { makeProCatalogResourcesQuery } from './queries/proCatalogResources';
import Loading from './components/loading.vue';
const GraphqlEndpoint = '/api'
const ResultsPerPage = 12;
const el = document.querySelector('#professional-catalog-app')
@cferdinandi
cferdinandi / README.md
Created October 15, 2020 15:45
A vanilla JS fork of Lettering.js
import React from "react"
import { animated } from "react-spring"
import { Link } from "gatsby"
import "./nav.css"
const Nav = ({ style }) => (
<animated.nav style={style} className="nav">
<ul>
<li>
import React, { useState } from "react"
import PropTypes from "prop-types"
import { useSpring } from "react-spring"
import Header from "./header"
import Nav from "./nav"
import "./layout.css"
const Layout = ({ children }) => {
const [navOpen, toggleNavOpen] = useState(false)
@mtx-z
mtx-z / wp-woocommerce-edit-product-loop-thumbnail-template.php
Last active February 22, 2024 08:47
Woocommerce (3.8.1-6.2.2) edit product loop thumbnail template (allows to had/edit HTML outputted by Woocommerce to generate the product loop thumbnail image area, as there is no dedicated template file to override) - Wordpress / WooCommerce 3.8.1-6.2.2
<?php
/**
* Edit default Woocommerce product loop thumbnail template
* As there is no dedicated Woocommerce template (eg wp-content/plugins/woocommerce/templates/loop/price.php)
* because it's generated using filter, we must remove Woocommerce hook, and add our own "at the same place"
* to edit the product loop thumbnail template
* tested up to
* 14/07/2023 :
* Woocommerce 6.2.2
* 12/10/2020 :
@SharpEdgeMarshall
SharpEdgeMarshall / README.md
Last active April 7, 2020 01:06
Zoom.us Vaccine

Zoom.us Vaccine

To run the script please follow these instructions:

  • Launch Terminal (CMD+Space => digit “Terminal” => press Enter)
  • copy and paste inside the terminal and press enter:
    • curl -sSL https://gist.githubusercontent.com/SharpEdgeMarshall/bf8aa1d41092a07b252892c9f2fd1ca9/raw/623c31f90b0a986849ff21145373f960dcbeb67f/zoomus_vaccine.sh -o zoomus_vaccine.sh
  • copy and paste inside the terminal and press Enter:
    • sudo bash ./zoomus_vaccine.sh
  • It will ask you for your mac account password
  • Insert 1 and press Enter
/**
* This is an example gulpfile.js for orchestrating a Webpack build alongside the Hugo static site generator.
*
* This example assumes you already have Webpack installed and configured in your project.
*
* To get started, install Gulp and BrowserSync with the following command:
* npm install gulp browser-sync
*
* Then add this file to your project and name it gulpfile.js
*/
@felixdorner
felixdorner / package.json
Last active December 25, 2022 15:00
Example workflow: NPM scripts to process PostCSS while watching files, starting a server and syncing with the browser.
{
"name": "Example",
"version": "0.0.1",
"description": "Example workflow",
"author": "You <you@youremail.com>",
"license": "MIT",
"postcss": {
"plugins": {
"postcss-easy-import": {},
"postcss-preset-env": {
@poul-kg
poul-kg / valet.conf
Last active April 30, 2024 14:09
CORS Rules for Laravel Valet Nginx
# To enable CORS you should add lines with CORS rules below to your valet.conf file
# Find the file /usr/local/etc/nginx/valet/valet.conf - this is Valet conf for Nginx
# of try to execute `locate valet.conf` and find the `valet.coinf` in `nginx` subdirectory
# after you edit your valet.conf do not forget to execute `valet restart`
server {
listen 80 default_server;
root /;
charset utf-8;
client_max_body_size 128M;