Skip to content

Instantly share code, notes, and snippets.

View zytzagoo's full-sized avatar

zytzagoo zytzagoo

View GitHub Profile
@zytzagoo
zytzagoo / composer-create-project-test.sh
Created October 9, 2017 15:02 — forked from beporter/composer-create-project-test.sh
Make the process of testing a `composer create-project` command easier by operating against your local working copy.
#!/usr/bin/env bash
# Allows you to test the create-project process using your local
# checked-out copy of the skeleton as the source. You MUST commit the
# changes you want to test to a git branch! You MUST name that branch
# as the first argument and the destination path to set up the fresh
# copy into as the second.
#
# Usage:
# - Place this script in your package's root directory and make it executable.
# - Set the PACKAGE_NAME variable below to match your composer.json's `name`.

Keybase proof

I hereby claim:

  • I am zytzagoo on github.
  • I am zytzagoo (https://keybase.io/zytzagoo) on keybase.
  • I have a public key whose fingerprint is B2F2 D54E 9DC9 FC12 6058 C4FE 1227 C163 521B F7D9

To claim this, I am signing this object:

@zytzagoo
zytzagoo / wp-cli-my-vps-install.sh
Created August 4, 2015 13:05
wp-cli quick install/setup
mkdir -p ~/bin
wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -O ~/bin/wp
chmod +x ~/bin/wp
wget https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash -O ~/.wp-completion.bash
if [[ ! -s "$HOME/.bash_profile" && -s "$HOME/.profile" ]] ; then
profile_file="$HOME/.profile"
else
profile_file="$HOME/.bash_profile"
@zytzagoo
zytzagoo / disable-yoast-notification-center.php
Last active September 19, 2023 18:14
Disable annoying Yoast SEO admin notifications
<?php
add_action( 'admin_init', function() {
if ( class_exists( 'Yoast_Notification_Center' ) ) {
$yoast_nc = Yoast_Notification_Center::get();
remove_action( 'admin_notices', array( $yoast_nc, 'display_notifications' ) );
remove_action( 'all_admin_notices', array( $yoast_nc, 'display_notifications' ) );
}
});
@zytzagoo
zytzagoo / functions_vbseo_hook.php
Last active July 26, 2023 10:55
Modified functions_vbseo_hook.php to avoid deprecated notices wrt preg_replace /e modifier
<?php
/************************************************************************************
* vBSEO 3.6.0 for vBulletin v3.x & v4.x by Crawlability, Inc. *
* *
* Copyright © 2011, Crawlability, Inc. All rights reserved. *
* You may not redistribute this file or its derivatives without written permission. *
* *
* Sales Email: sales@crawlability.com *
* *
@zytzagoo
zytzagoo / mina.rb
Last active April 4, 2016 13:54
Modified/patched lib/mina.rb (0.3.2) for Windows support
# lib/mina.rb
module Mina
PREFIX = File.dirname(__FILE__)
ROOT = File.expand_path('../../', __FILE__)
# if running on windows
is_windows = !!(RUBY_PLATFORM =~ /mswin|mingw|windows|cygwin/)
if is_windows
module Shellwords
#!/usr/bin/env bash
# vim:noet:sts=4:ts=4:sw=4:tw=120
#=======================================================================================================================
# (c) 2014 Clemens Lang, neverpanic.de
# See https://neverpanic.de/blog/2014/03/19/downloading-google-web-fonts-for-local-hosting/ for details.
#
# With modifications by
# - Chris Jung, campino2k.de, and
# - Robert, github.com/rotx.
@zytzagoo
zytzagoo / gmft-console-dump-uris.js
Created November 19, 2014 14:28
Ran via devtools console to extract google mobile friendly tool's complete blocked/failed resource URIs (from the results page)
var jq = document.createElement('script');
jq.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js';
document.getElementsByTagName('head')[0].appendChild(jq);
setTimeout(function(){
jQuery.noConflict();
var lists = jQuery('.url-list');
lists.each(function(i,el) {
var $lis = jQuery(el).find('li');