This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: WP Slack REST API Backend | |
* Description: An example of using the WordPress REST API as a backend for a Slack Bot | |
* Author: Andy Brudtkuhl | |
* Author URI: http://youmetandy.com | |
* Version: 0.1 | |
* Plugin URI: https://github.com/abrudtkuhl/heykramer | |
* License: GPL2+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Logging; | |
use Illuminate\Log\Events\MessageLogged; | |
use Monolog\Logger; | |
use Logspot\Client; | |
class LogspotDriver | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.getElementById('search-submit').onclick = function() { | |
gtag('event', 'homepage_search', { | |
'event_category': 'Search', | |
'event_action': 'submit', | |
'event_label': 'Homepage Search' | |
}); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* facebook comments */ | |
.fb-comments, .fb-comments iframe[style], .fb-like-box, .fb-like-box iframe[style] {width: 100% !important;} | |
.fb-comments span, .fb-comments iframe span[style], .fb-like-box span, .fb-like-box iframe span[style] {width: 100% !important;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change to the project directory | |
cd /home/forge/domain.com | |
# Turn on maintenance mode | |
php artisan down || true | |
# Pull the latest changes from the git repository | |
# git reset --hard | |
# git clean -df | |
git pull origin master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This config is based @karmi's answer on this Stackoverflow post: http://stackoverflow.com/a/14120342/12442 | |
# | |
# Run me with: | |
# | |
# $ nginx -c path/to/this/file | |
# | |
# All requests except GET are denied. | |
worker_processes 1; | |
pid nginx.pid; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var WP = require( 'wordpress-rest-api' ); | |
var wp = new WP({ endpoint: 'http://local.dev/wp-json/' }); | |
var Bot = require('slackbots'); | |
var settings = { | |
token: XXXX, | |
name: 'kramerbot' | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Admin Filter BY Custom Fields | |
Plugin URI: http://en.bainternet.info | |
Description: Filter posts or pages in admin by custom fields (post meta) | |
Version: 1.0 | |
Author: Bainternet | |
Author URI: http://en.bainternet.info | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run me with: | |
# | |
# $ nginx -p /path/to/this/file/ -c nginx.conf | |
# | |
# All requests are then routed to authenticated user's index, so | |
# | |
# GET http://user:password@localhost/_search?q=* | |
# | |
# is rewritten to: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM wp_posts; | |
DELETE FROM wp_post_meta; | |
TRUNCATE TABLE wp_posts; | |
TRUNCATE TABLE wp_post_meta; |
NewerOlder