Skip to content

Instantly share code, notes, and snippets.

View vburlak's full-sized avatar
🚀

Vladislav Burlak vburlak

🚀
View GitHub Profile
@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
<?php
namespace Roots\Sage\Nav;
use Roots\Sage\Utils;
/**
* Cleaner walker for wp_nav_menu()
*
* Walker_Nav_Menu (WordPress default) example output:
@vburlak
vburlak / jquery.addrule.js
Created December 9, 2015 15:01
Manipulating CSS pseudo-elements using jQuery
/*!
* jquery.addrule.js 0.0.1 - https://gist.github.com/yckart/5563717/
* Add css-rules to an existing stylesheet.
*
* @see http://stackoverflow.com/a/16507264/1250044
*
* Copyright (c) 2013 Yannick Albert (http://yckart.com)
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php).
* 2013/05/12
**/
<?php namespace GM;
class PointersManager implements PointersManagerInterface {
private $pfile;
private $version;
private $prefix;
private $pointers = array();
public function __construct( $file, $version, $prefix ) {
@vburlak
vburlak / vc2twbs3classes
Last active April 29, 2020 15:24
Replace Visual Composer initial classes with original Bootstrap 3 classes
/**
* Replace Visual Composer initial classes with original Bootstrap 3 classes
*
* @author http://codecanyon.net/user/adambartholomew1
* @source from http://pastebin.com/qJp9SXvP
* @package vc2twbs3classes
* @version 0.1
*/
$lCounter = 0;