Skip to content

Instantly share code, notes, and snippets.

View MikeiLL's full-sized avatar

Mike iLL Kilmer MikeiLL

View GitHub Profile
@uptimizt
uptimizt / gutenberg_disable_cpt.php
Last active May 25, 2018 05:37
Disable Gutenberg support for CPT 'product' in WooCommerce
<?php
/*
Plugin Name: Gutenberg - disable CPT
Description: Отключаем поддержку Gutenberg для постов типа Продукт
Author: uptimizt
Version: 1.0
Author URI: http://wpcraft.ru
*/
// Use hook return apply_filters( 'gutenberg_can_edit_post_type', $can_edit, $post_type );
@elibosley
elibosley / archive-all-facebook-messages.js
Last active March 6, 2024 03:36 — forked from tedmiston/archive-all-facebook-messages.js
Archive all of the messages in your Facebook Messages Inbox
function archive_all(testOnly) {
messages = $("._5blh")
console.log("Found", messages.length, "messages on messsenger.");
if (!testOnly) {
for (i = 0; i < messages.length; i++) {
try {
messages[i].click()// open dialog
$("li:contains('Archive')").last().click()
@jeffersonmartin
jeffersonmartin / composer-private-package-github-token.md
Last active April 11, 2024 11:22
Generate a GitHub Personal Access Token for Private Composer Packages

Generate a GitHub Personal Access Token for Private Composer Packages

If you're trying to load a private repository with Composer/Laravel, we'll need to generate a GitHub Personal Access Token (similar to OAuth token) to access the repository during a composer install without entering credentials.

If you have used other Github packages from {my-org} before, you may be able to skip this step.

  1. Visit https://github.com/settings/tokens.

  2. Click Generate new token.

@andkirby
andkirby / slack.sh
Last active April 4, 2024 17:51
Shell/Bash script for sending slack messages.
#!/usr/bin/env bash
####################################################################################
# Slack Bash console script for sending messages.
####################################################################################
# Installation
# $ curl -s https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack
# $ chmod +x /usr/bin/slack
####################################################################################
# USAGE
# Send message to slack channel/user
@smutek
smutek / Bootstrap4Nav-Sage9.md
Last active July 30, 2022 06:50
Bootstrap 4 Walker for Sage 9

Credit

This is a frankensteind version of the current Soil nav walker, by the Roots team, and Michael Remoero's Sagextras walker. All credit goes to those good folks. :)

Use

  • Replace the contents of header.blade.php with the attached header.
  • Copy the walker.php file to the /app directory.
  • Add walker.php to the Sage required files array in resources/functions.php - eg. on a stock Sage install the entry would look like:
/**
@chrisjimallen
chrisjimallen / docker-compose.yaml
Created March 3, 2017 18:40
Browsersync working in docker container.
version: '2'
services:
wordpress:
image: wordpress
expose:
- 80
environment:
WORDPRESS_DB_PASSWORD: example
@shashankmehta
shashankmehta / setup.md
Last active January 7, 2024 11:57
Setup PHP and Composer on OSX via Brew

First install Brew on your MAC

  • Setup Brew: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • brew update
  • brew tap homebrew/dupes
  • brew tap homebrew/php
  • Install PHP 7.0.+ brew install php70
  • Install mcrypt: brew install mcrypt php70-mcrypt
  • Finally, install composer: brew install composer
@thefuxia
thefuxia / Autoload.php
Created January 16, 2017 09:53
PSR 4 autoloader
<?php
namespace T5\Files;
/**
* Simple PSR-4 autoloader
* See http://codereview.stackexchange.com/a/150308/318 for an explanation
*/
class Autoload
{
/**
@anttiviljami
anttiviljami / wp-admin-modal-dialog.php
Last active January 5, 2024 14:25
WordPress admin modal dialog example
<?php
// enqueue these scripts and styles before admin_head
wp_enqueue_script( 'jquery-ui-dialog' ); // jquery and jquery-ui should be dependencies, didn't check though...
wp_enqueue_style( 'wp-jquery-ui-dialog' );
?>
<!-- The modal / dialog box, hidden somewhere near the footer -->
<div id="my-dialog" class="hidden" style="max-width:800px">
<h3>Dialog content</h3>
<p>This is some terribly exciting content inside this dialog. Don't you agree?</p>
@bjorn2404
bjorn2404 / wp_kses_post_tags.php
Last active April 22, 2024 15:08
WordPress allow iFrames with wp_kses_post filter
<?php
/**
* Add iFrame to allowed wp_kses_post tags
*
* @param array $tags Allowed tags, attributes, and/or entities.
* @param string $context Context to judge allowed tags by. Allowed values are 'post'.
*
* @return array
*/