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
# -*- 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. |
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
<?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" /> |
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
!/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.. |
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
/** | |
* File upload ajax handler function to save the file and send image or file html back to the browser | |
* These functions are part of a class | |
*/ | |
function ajax_upload_file() { | |
check_ajax_referer( 'ugc_user_upload', 'nonce' ); | |
$file_data = array( | |
'name' => $_FILES['ugc_attachment_file']['name'], | |
'type' => $_FILES['ugc_attachment_file']['type'], | |
'tmp_name' => $_FILES['ugc_attachment_file']['tmp_name'], |
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 | |
/** | |
* Gets the permalink from the post slug | |
* @param string $name the post, page or custom post type slug | |
* @param string $p_type the post type | |
* | |
* @return string The permalink YAHHH!!! | |
*/ | |
function get_perm_byname( $name, $p_type = 'page' ) { |
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: Hook Debug Output | |
* Plugin URI: http://unserkaiser.com | |
* Description: Debug Hooked filter callback functions with adding <code>?debug=secret&hook=your_hook_name</code> to the URl | |
* Version: 0.1 | |
* Author: Stephen Harris, Franz Josef Kaiser | |
* Author URI: http://unserkaiser.com | |
*/ | |
// Prevent loading this file directly - Busted! |
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
## Start nginx.conf | |
user www-data; | |
worker_processes 8; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; |
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
user www-data; | |
worker_processes 4; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
# multi_accept on; | |
} | |
http { |
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
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 |