Skip to content

Instantly share code, notes, and snippets.

View frankyonnetti's full-sized avatar

Frank Yonnetti frankyonnetti

View GitHub Profile
@frankyonnetti
frankyonnetti / LocalValetDriver.php
Created February 17, 2025 17:11 — forked from Awilson089/LocalValetDriver.php
Remote image proxy for Valet 4 – Wordpress
<?php
use Valet\Drivers\Specific\WordPressValetDriver;
class LocalValetDriver extends WordPressValetDriver {
/** @var string The remote host to proxy requests to */
const REMOTE_HOST = 'https://remotehost.com/';
/** @var string If the request URI starts with this, we want to proxy the request to the remote host */
const URI_PREFIX = '/wp-content/uploads/';

Webpack Drupal Theming

Install

Install the following node modules (npm), in the same directory as this readme file, for compiling and linting our code.

npm i -D @babel/core @babel/preset-env autoprefixer babel-loader browser-sync browser-sync-webpack-plugin css-loader mini-css-extract-plugin postcss-loader postcss-pxtorem sass sass-loader standard stylelint stylelint-config-sass-guidelines stylelint-order webpack webpack-cli
# [NPM Check Updates](https://www.npmjs.com/package/npm-check-updates)
- Install the tool `npm i -D npm-check-updates`
- Update the package.json `npx ncu --upgrade`
- Install the new packages npm install
!.eslintrc.json
!README.md
node_modules
bsync-config.js
> 0.2%
last 2 version
Firefox ESR
not dead
@frankyonnetti
frankyonnetti / jQuery to vanilla JavaScript.md
Last active November 27, 2024 14:40
Cheat sheet for moving from jQuery to vanilla JavaScript https://tobiasahlin.com/blog/move-from-jquery-to-vanilla-javascript #javascript #vanilla
@frankyonnetti
frankyonnetti / gen-d8-salt.sh
Created February 24, 2022 16:24 — forked from pfaocle/gen-d8-salt.sh
Generate Drupal 8 hash salt
drush eval "var_dump(Drupal\Component\Utility\Crypt::randomBytesBase64(55))"
@frankyonnetti
frankyonnetti / CSS Triangle.css
Created September 17, 2021 18:08
#CSS #triangle
https://css-tricks.com/snippets/css/css-triangle/
.arrow-up {
content: "";
border-right: 15px solid transparent;
border-bottom: 15px solid black;
border-left: 15px solid transparent;
width: 0;
height: 0;
}