Skip to content

Instantly share code, notes, and snippets.

😀
Happy

Micah Wood wpscholar

😀
Happy
Block or report user

Report or block wpscholar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wpscholar
wpscholar / cloudSettings
Last active Aug 22, 2019
Visual Studio Code Settings
View cloudSettings
{"lastUpload":"2019-08-22T18:39:00.396Z","extensionVersion":"v3.2.9"}
@earnjam
earnjam / .bash_profile
Created Sep 28, 2018
Custom bash profile
View .bash_profile
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
# 6. Networking
# 7. System Operations & Information
View block.js
(function (wp) {
//WordPress APIs
//Render function
var el = wp.element.createElement;
//Translations
var __ = wp.i18n.__;
//Text input control
var TextControl = wp.blocks.InspectorControls.TextControl;
//Create block
wp.blocks.registerBlockType('shelob9/metatest2', {
@samthor
samthor / safari-nomodule.js
Last active Sep 7, 2019
Safari 10.1 `nomodule` support
View safari-nomodule.js
/**
* Safari 10.1 supports modules, but does not support the `nomodule` attribute - it will
* load <script nomodule> anyway. This snippet solve this problem, but only for script
* tags that load external code, e.g.: <script nomodule src="nomodule.js"></script>
*
* Again: this will **not** prevent inline script, e.g.:
* <script nomodule>alert('no modules');</script>.
*
* This workaround is possible because Safari supports the non-standard 'beforeload' event.
* This allows us to trap the module and nomodule load.
@neilgee
neilgee / custom-provision.sh
Created Jul 13, 2015
Custom VVV Variable Provisioning for WordPress sites
View custom-provision.sh
# #!/bin/bash
# #
# # provision.sh
# #
# # This file is specified in Vagrantfile and is loaded by Vagrant as the primary
# # provisioning script whenever the commands `vagrant up`, `vagrant provision`,
# # or `vagrant reload` are used. It provides all of the default packages and
# # configurations included with Varying Vagrant Vagrants.
# # By storing the date now, we can calculate the duration of provisioning at the
@FrankM1
FrankM1 / provision.sh
Created May 18, 2015
Faster provisioning for vvv - Removed provisioning for Wordpress Core development. That took a long time to complete
View provision.sh
#!/bin/bash
#
# provision.sh
#
# This file is specified in Vagrantfile and is loaded by Vagrant as the primary
# provisioning script whenever the commands `vagrant up`, `vagrant provision`,
# or `vagrant reload` are used. It provides all of the default packages and
# configurations included with Varying Vagrant Vagrants.
# By storing the date now, we can calculate the duration of provisioning at the
@thomasgriffin
thomasgriffin / api-helper.php
Last active Mar 13, 2019
API Helper to be used during API requests. Should be used as a must-use plugin in WordPress.
View api-helper.php
<?php
/**
* Plugin Name: TGM API Helper
* Plugin URI: https://thomasgriffin.io
* Description: Whitelists the plugins to be loaded during API requests to reduce overhead.
* Author: Thomas Griffin
* Author URI: https://thomasgriffin.io
* Version: 1.0.0
*/
@fversnel
fversnel / SmartSortable.js
Created Dec 30, 2014
React SmartSortable
View SmartSortable.js
var cloneWithProps = React.addons.cloneWithProps;
var SmartSortable = React.createClass({
getDefaultProps: function() {
return {component: "ul", childComponent: "li"};
},
render: function() {
var props = jQuery.extend({}, this.props);
@markjaquith
markjaquith / nginx.conf
Last active Jul 14, 2019
My WordPress Nginx setup
View nginx.conf
upstream phpfpm {
server unix:/var/run/php5-fpm.sock;
}
upstream hhvm {
server unix:/var/run/hhvm/hhvm.sock;
}
# SSL
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
@wpscholar
wpscholar / load-views.php
Created Jul 23, 2014
Load Ember templates in WordPress
View load-views.php
<?php
/**
* Load Ember templates in WordPress
*/
public static function load_views() {
$iterator = new \DirectoryIterator( plugin_dir_path( __FILE__ ) . 'views' );
foreach ( $iterator as $file ) {
/**
* @var \SplFileInfo $file
You can’t perform that action at this time.