Skip to content

Instantly share code, notes, and snippets.

View vburlak's full-sized avatar
🚀

Vladislav Burlak vburlak

🚀
View GitHub Profile
@vburlak
vburlak / deploy.yml
Created October 10, 2022 13:50 — forked from hhhonzik/deploy.yml
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
@vburlak
vburlak / tailwind.config.js
Created May 4, 2022 21:29 — forked from alexstandiford/tailwind.config.js
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) {
@vburlak
vburlak / block-editor-cleanup.php
Created April 11, 2022 19:45 — forked from joshuafredrickson/block-editor-cleanup.php
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.0
* 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
@vburlak
vburlak / nginxrewrite2.md
Created March 31, 2022 18:31 — forked from esfand/nginxrewrite2.md
Nginx Rewrite
@vburlak
vburlak / movegfjstofooter.php
Created July 30, 2020 20:16 — forked from eriteric/movegfjstofooter.php
Load gravity forms JS in footer
// GF method: http://www.gravityhelp.com/documentation/gravity-forms/extending-gravity-forms/hooks/filters/gform_init_scripts_footer/
add_filter( 'gform_init_scripts_footer', '__return_true' );
// solution to move remaining JS from https://bjornjohansen.no/load-gravity-forms-js-in-footer
add_filter( 'gform_cdata_open', 'wrap_gform_cdata_open' );
function wrap_gform_cdata_open( $content = '' ) {
$content = 'document.addEventListener( "DOMContentLoaded", function() { ';
return $content;
}
add_filter( 'gform_cdata_close', 'wrap_gform_cdata_close' );
@vburlak
vburlak / Readme.md
Created June 13, 2020 09:06 — forked from dluco-/Readme.md
Setting up Xdebug to work with trellis and Visual Studio Code.
@vburlak
vburlak / pmt.js
Created February 5, 2020 22:21 — forked from maarten00/pmt.js
Excel PMT in PHP and JavaScript
/**
* Copy of Excel's PMT function.
* Credit: http://stackoverflow.com/questions/2094967/excel-pmt-function-in-js
*
* @param rate_per_period The interest rate for the loan.
* @param number_of_payments The total number of payments for the loan in months.
* @param present_value The present value, or the total amount that a series of future payments is worth now;
* Also known as the principal.
* @param future_value The future value, or a cash balance you want to attain after the last payment is made.
* If fv is omitted, it is assumed to be 0 (zero), that is, the future value of a loan is 0.
@vburlak
vburlak / jsonview-monokai.css
Created December 6, 2018 17:46 — forked from chamoysvoice/jsonview-monokai.css
JSON View monokai theme for Chrome Extension
body {
white-space: pre;
font-family: monospace;
font-size: 1.2em; /* I like big fonts, if you don't remove this line */
background: #272822;
color: #f8f8f2;
}
.property {
font-weight: auto;
@vburlak
vburlak / jsonview-solarized.css
Created December 6, 2018 17:45 — forked from iansym/jsonview-solarized.css
JSON View solarized theme for Chrome Extension
body {
background-color: #002b36;
color: #839496;
font-size: 14px;
white-space: pre !important;
font-family: "Source Code Pro", monospace;
}
.property {
font-weight: bold;
@vburlak
vburlak / wpinstall.sh
Last active April 2, 2024 08:30 — forked from teledirigido/wpinstall.sh
Download and Install Wordpress and Roots/Sage theme via WP-CLI
#!/bin/bash
# This bash script works JUST with WP-CLI
# You can get it from here:
# http://wp-cli.org/
#
# If you don't know what to do with this file:
#
# 1) Install wp-cli on your workspace
# 2) Create a file call wpinstall.sh