Skip to content

Instantly share code, notes, and snippets.

View c3mdigital's full-sized avatar

Chris Olbekson c3mdigital

  • WebDev Studios
  • Houston, TX
View GitHub Profile
@c3mdigital
c3mdigital / WordPress.xml
Created November 18, 2012 08:40
WordPress coding style for PhpStorm
<?xml version="1.0" encoding="UTF-8"?>
<code_scheme name="WordPress">
<option name="USE_SAME_INDENTS" value="true" />
<option name="IGNORE_SAME_INDENTS_FOR_LANGUAGES" value="true" />
<option name="OTHER_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="true" />
@c3mdigital
c3mdigital / start_local_servers.sh
Last active December 15, 2015 03:09
Bash script to start, stop and reload local installed servers.
!/bin/bash
#This bash script controls starting and stopping the homebrew installed Nginx, PHP-FPM and MySql servers
start=start
stop=stop
restart=restart
status=status
echo server $1 executed..
@c3mdigital
c3mdigital / plugin.php
Last active October 24, 2021 02:10 — forked from joncave/plugin.php
<?php
/* Plugin Name: Damn Vulnerable WordPress Plugin
* Description: Intentionally vulnerable plugin for plugin author education
* Version: 0.1
* Plugin URI: http://make.wordpress.org/plugins/2013/04/09/intentionally-vulnerable-plugin/
* Author: Jon Cave
* Author URI: http://joncave.co.uk
* License: GPLv2+
*
* DO NOT RUN THIS PLUGIN ON AN INTERNET ACCESSIBLE SITE
<?php
/**
* WordPress Chosen Taxonomy Metabox
* Author: Helen Hou-Sandi
*
* Use Chosen for a replacement taxonomy metabox in WordPress
* Useful for taxonomies that aren't changed much on the fly and are
* non-hierarchical in nature, as Chosen is for flat selection only.
* You can always use the taxonomy admin screen to add/edit taxonomy terms.
* Categories need slightly different treatment from the rest in order to
@c3mdigital
c3mdigital / Code_Style_WordPress.xml
Last active December 26, 2015 04:48
PHP Storm WordPress Code Style, Code Inspection Settings, Solarized Color Schemes
<?xml version="1.0" encoding="UTF-8"?>
<!-- Add this file to /Library/Preferences/Webide60/codestyles -->
<code_scheme name="WordPress Code Style">
<option name="USE_SAME_INDENTS" value="true" />
<option name="IGNORE_SAME_INDENTS_FOR_LANGUAGES" value="true" />
<option name="OTHER_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<?php
/**
* Plugin Name: Stream User Generator
* Description: Generates X-Team users for testing
* Version: 0.1
* Author: johnregan3
* Author URI: http://johnregan3.me
*
* USE:
* Upload this into your Plugins directory.
@c3mdigital
c3mdigital / wp_dequeue_media.php
Last active August 29, 2015 14:00
Dequeue the media javascript libraries loaded with wp_enqueue_media
/**
* Remove media library javascript files to prevent other plugins from conflicting with yours.
*/
function dequeue_media_conflicts() {
if ( 'your_plugin_hook_name' !== get_current_screen() ) {
return;
}
wp_dequeue_script( 'media-upload' );
wp_enqueue_script( 'media-editor' );
@c3mdigital
c3mdigital / VagrantFile
Created May 1, 2014 20:29
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
dir = Dir.pwd
vagrant_dir = File.expand_path(File.dirname(__FILE__))
Vagrant.configure("2") do |config|
# Store the current version of Vagrant for use in conditionals when dealing
# with possible backward compatible issues.
@c3mdigital
c3mdigital / provision.sh
Created May 1, 2014 20:59
Vagrant Provisioning Script
#!/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
diff --git Vagrantfile Vagrantfile
index 65de7b1..40ba133 100644
--- Vagrantfile
+++ Vagrantfile
@@ -33,7 +33,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
v.vm.box_url = "http://files.vagrantup.com/precise64_vmware.box"
end
- if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) == nil
- config.vm.synced_folder ".", "/srv", nfs: true