This file contains hidden or 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
| mkdir quickstart | |
| cd quickstart | |
| vagrant box add base http://files.vagrantup.com/lucid32.box | |
| vagrant init | |
| vagrant up | |
| vagrant ssh |
This file contains hidden or 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
| # Do all of this where you'd like the project to live | |
| git clone https://github.com/10up/varying-vagrant-vagrants.git project-name | |
| cd project-name | |
| vagrant up |
This file contains hidden or 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
| #!/usr/bin/php | |
| <?php | |
| // Get the repo name | |
| $repo = $argv[1]; | |
| $type = $argv[2] . 's'; | |
| file_put_contents( '/home/git/triggered', "The $repo repository was created"); | |
| // Make the required directories |
This file contains hidden or 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
| #!/usr/bin/php | |
| <?php | |
| /* Begin Variables */ | |
| // Get the repo name | |
| $path = exec("pwd"); | |
| $repo = basename($path, ".git"); | |
| // Get the branch name |
This file contains hidden or 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
| echo '<p class="alphabet">'; | |
| foreach ( range('A', 'Z') as $char) { | |
| printf( '<a href="#%1$s">%1$s</a> ', $char ); | |
| } | |
| echo '</p>'; | |
| //loop through posts | |
| global $posts; | |
| foreach( $posts as $post ) { | |
| $this_char = strtoupper( substr( $post->post_title, 0, 1 ) ); |
This file contains hidden or 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
| "repositories": [ | |
| { | |
| "type" : "package", | |
| "package": { | |
| "name": "wordpress/unit-tests", | |
| "version": "1.0", | |
| "source" : { | |
| "type": "svn", | |
| "url": "http://unit-tests.svn.wordpress.org", | |
| "reference": "trunk" |
This file contains hidden or 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/sh | |
| # This script assumes a few things | |
| # 1. You are running Nginx | |
| # 2. WP-CLI is installed | |
| # 3. Your user is part of the www-data group | |
| # 4. Nginx_ensite is installed (https://github.com/perusio/nginx_ensite) | |
| # 5. nginx-wp-common.conf is installed at `/etc/nginx/nginx-wp-common.conf` | |
| # How to use |
This file contains hidden or 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 | |
| add_filter( 'optinmonster_output', 'limit_views' ); | |
| function limit_views ( $optins ) { | |
| // Replace this with your optin slug | |
| $optin_slug = 'yf3rluqqcj-lightbox'; | |
| // Replace this with the number of views | |
| $view_limit = 100; |
This file contains hidden or 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 | |
| add_action( 'plugins_loaded', 'om_sample_plugins_loaded' ); | |
| function om_sample_plugins_loaded() { | |
| // Bail if the main class does not exist. | |
| if ( ! class_exists( 'Optin_Monster' ) ) { | |
| return; | |
| } |
This file contains hidden or 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: OptinMonster Sample Theme | |
| * Plugin URI: http://optinmonster.com/ | |
| * Description: OptinMonster is the best lead generation plugin for WordPress. | |
| * Author: OptinMonster Developers | |
| * Author URI: http://optinmonster.com | |
| * Version: 1.0 | |
| * Text Domain: optin-monster-sample-theme | |
| * Domain Path: languages |