Skip to content

Instantly share code, notes, and snippets.

Working remotely since 1999

Ihor Vorotnov ihorvorotnov

Working remotely since 1999
View GitHub Profile
slaFFik / expose.php
Created Jan 31, 2021
Fix Expose by BeyondCode issues when working with the local WordPress site
View expose.php
// phpcs:ignoreFile
define( 'EXPOSED_DOMAIN', '' );
// Load only if we are running under Expose.
janispritzkau / analytics.js
Last active Oct 12, 2021
Minimal Google Analytics Script (677 bytes minified)
View analytics.js
((document, location, navigator) => {
const domain = location.hostname.split(".")
const match = document.cookie.match(/(^|; ?)_ga=GA1\.\d\.(\d+\.\d+)(;|$)/)
// use existing client id or generate one
const cid = match ? match[2] : ~~(2147483648 * Math.random()) + "." + ~~( / 1000)
// set cookie at highest possible domain level
for (let i = domain.length; i--;) {
const cookie = `_ga=GA1.${domain.length - i}.${cid}`
mishterk / responsive-oembeds-class-for-wp.php
Created Jan 9, 2020
Wraps oEmbed output in markup which we can then target with CSS for fluid responsiveness.
View responsive-oembeds-class-for-wp.php
class ResponsiveOEmbeds {
* Regex patterns for matching specific embeddable URLs
* @var array
gokulkrishh /
Last active Oct 15, 2021
List of useful npx (Node Package Runner) commands (

NPX (NPM Package Runner) Commands

List of useful npx (NPM Package Runner) commands.

What is NPX?

Using NPX we can execute/run node binaries without the need to install it locally or globally.


mtunjic /
Last active Oct 21, 2021 — forked from pwnsdx/
Disable bunch of #$!@ in Catalina
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
View unset-woocommerce-order-actions.php
add_filter( 'woocommerce_order_actions', function ( $actions ) {
// Unset whatever actions you don't need available in the
// WooCommerce order edit screen.
unset( $actions['send_order_details_admin'] );
unset( $actions['send_order_details'] );
unset( $actions['regenerate_download_permissions'] );
View class-make-release-command.php
namespace WpLandingKitPlugin;
use WP_CLI;
use WP_CLI_Command;
View class-view.php
class View {
public static $view_dir = '';
* Render View Template With Data
mishterk / app.php
Last active Jul 1, 2020
An example illustrating PHP's ability to return data from included files. For more info, see
View app.php
$config = include 'config.php';
echo $config['some']; // 'config'
mishterk / Dump.php
Created Oct 19, 2019
A simple static class for dumping information to a log file of your choosing. For more info, see
View Dump.php
* Class Dump
* A simple static class for dumping data to a separate log file to aid debugging and development.
* @author Phil Kurth <>
class Dump {