Skip to content

Instantly share code, notes, and snippets.

View vburlak's full-sized avatar
🚀

Vladislav Burlak vburlak

🚀
View GitHub Profile
@sbutler
sbutler / op-aws-credentials.py
Last active November 22, 2022 19:18
1Password credentials helper for AWS CLI/SDK
#!/usr/bin/env python3
"""
```
Copyright (c) 2022 University of Illinois Board of Trustees
All rights reserved.
Developed by: Technology Services
University of Illinois at Urbana-Champaign
https://techservices.illinois.edu/
```
<?php
public function delete_thumbnails( $args, $assoc_args ) {
global $wpdb;
if ( isset( $assoc_args['dry-run'] ) && 'false' === $assoc_args['dry-run'] ) {
$dry_run = false;
} else {
$dry_run = true;
WP_CLI::line( '!!! Doing a dry-run, no thumbnails will be deleted.' );
}
@joshuafredrickson
joshuafredrickson / block-editor-cleanup.php
Last active April 19, 2022 13:47
Block Editor Cleanup for WordPress 5.9 and Classic Editor (mu-plugin)
<?php
/**
* Plugin Name: Block Editor Cleanup
* Plugin URI: https://github.com/WordPress/gutenberg/issues/38299#issuecomment-1025520487
* Version: 1.0.1
* Description: Remove WP 5.9 default block editor styles when using Classic Editor
* Author: joshuafredrickson
* Author URI: https://joshuafredrickson.com
* License: GNU General Public License v2
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
@alexstandiford
alexstandiford / tailwind.config.js
Created August 27, 2021 17:54
WordPress theme.json that extends Tailwind CSS configs
const fs = require( 'fs' )
const themeJson = fs.readFileSync( './theme.json' )
const theme = JSON.parse( themeJson )
const colors = theme.settings.color.palette.reduce( ( acc, item ) => {
const [color, number] = item.slug.split( '-' )
// If there is a number identifier, make this an object
if(undefined !== number) {
@artginzburg
artginzburg / puppeteer-chromium-macOS-Firewall-popup-stop.md
Last active October 26, 2022 12:12
 The solution to "Do you want to the application Chromium.app to accept incoming network connections" on every launch

For macOS to stop showing the puppeteer firewall popup

  1. Get to the root of your npm project directory (cd <repo>)

  2. Paste the following command in your shell:

sudo codesign --force --deep --sign - ./node_modules/puppeteer/.local-chromium/
@hhhonzik
hhhonzik / deploy.yml
Last active April 22, 2024 10:30
Kinsta Deployment
# Kinsta Deployment through Github Actions for Bedrock/Sage.
#
# Placed at: .github/workflow/deploy.yml
#
# Process should be studied from code, but some quick brief:
# - runs composer / sage installation
# - moves correct `.env.*` file for multiple configs
# - uses rsync to sync files, uses /.rsyncignore file to exclude whatever should not be there
# - symlinks uploads folder and symlink release folder to kinsta public hostname
# - if you want to clear cache, please uncomment the last job

⚠️ Warning: this document is out of date.

For the most recent webpack5 instructions see MIGRATION.md.

Storybook experimental Webpack 5 support

Storybook 6.2 includes experimental Webpack 5 support. Webpack 5 brings a variety of performance improvements, as well as exciting new features like module federation. Here's a quick guide to get you going.

Intro

@bhanu-krenovate
bhanu-krenovate / es6importexport.js
Created August 19, 2020 16:57
Importing and Exporting ES6 modules for sage roots.
PAGE NAME : group-slider.js at "script/components/group-slider.js"
//////////////////////////////
import Swiper, {Navigation, Pagination} from 'swiper';
Swiper.use([Navigation, Pagination]);
const groupSlider = new Swiper('#group-cards', {
spaceBetween: 5,
speed: 300,
/** @wordpress */
import {__} from '@wordpress/i18n'
import {RichText} from '@wordpress/block-editor'
/** Modules */
import PropTypes from 'prop-types'
/** Components */
import Buttons from '@blocks/ndn-page-header/components/Buttons'
@Tommy-b
Tommy-b / GRAVITY FORMS WITH SWUP - BARBA PAGE TRANSITIONS
Last active April 23, 2024 14:21
This allows your gravity forms to load via ajax to ensure they work correctly with page transitions that have no window/document.onload
This allows your gravity forms to load via ajax to ensure they work correctly with page transitions that have no window/document.onload