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 | |
| function bbg_activity_subnav( $items, $menu, $args ) { | |
| // Find the Activity item | |
| $bp_pages = bp_core_get_directory_page_ids(); | |
| if ( isset( $bp_pages['activity'] ) ) { | |
| $activity_directory_page = $bp_pages['activity']; | |
| } else { | |
| return $items; |
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 | |
| # A script that leverages Trac XML-RPC (I know, I know) to upload patches. | |
| # | |
| # This script is written specifically for the Mac, in that it reads from | |
| # your keychain to derive your SVN password. You can change the SVN_PASS | |
| # line below if you wanted to pull from ~/.svn/ or what not. | |
| # | |
| # Basic usage: `trac-attach.sh 12345` uploads a patch to ticket #12345, | |
| # using the name 12345.diff. If there exists a 12345.diff, the patch is |
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: Gist oEmbed | |
| Plugin URI: http://ninnypants.com | |
| Description: Embed gists into posts | |
| Version: 1.0 | |
| Author: ninnypants | |
| Author URI: http://ninnypants.com | |
| License: GPL2 |
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 | |
| /** | |
| * Provide functionality to register new Archive Elements | |
| */ | |
| /** | |
| * Proposed generic field class to be used by the Settings API, Widgets, |
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 | |
| /** | |
| * Recursive argument parsing | |
| * | |
| * This acts like a multi-dimensional version of wp_parse_args() (minus | |
| * the querystring parsing - you must pass arrays). | |
| * | |
| * Values from $a override those from $b; keys in $b that don't exist | |
| * in $a are passed through. |
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 | |
| //where you want your thumbnails to go | |
| $thumbs_dir = 'uploads/thumbs/'; | |
| //this should be an array of video paths | |
| $videos = array(); | |
| if( $_POST["name"] ){ | |
| // Grab the MIME type and the data with a regex for convenience | |
| if (!preg_match('/data:([^;]*);base64,(.*)/', $_POST['data'], $matches)) { |
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
| // iframes | |
| var $iframes = $( document.querySelectorAll( '.videos iframe' ) ); | |
| function iframeSizing() { | |
| var $this = $( this ), | |
| width = $this.width(), | |
| height = $this.height(), | |
| containerWidth = $this.parent().width(), | |
| heightRatio = height / width, | |
| newHeight = heightRatio * containerWidth; |
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: Time Shortcode | |
| * Author: Otto | |
| * | |
| * Usage: [time]any-valid-time-string-here[/time] | |
| * Will attempt to parse the time string and create a format that shows it in the viewers local time zone | |
| * Note that times should be complete with year, month, day, and hour and minute.. something strtotime can parse meaningfully | |
| * Conversion happens via Javascript and will depend on the users browser. | |
| **/ |
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
| # delete local tag '12345' | |
| git tag -d 12345 | |
| # delete remote tag '12345' (eg, GitHub version too) | |
| git push origin :refs/tags/12345 | |
| # alternative approach | |
| git push --delete origin tagName | |
| git tag -d tagName |
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 | |
| // Vendor includes | |
| include $config->base_path . '/libraries/Vendor/autoload.php'; | |
| // Include configuration file | |
| $config = include('../config.php'); | |
| // Create IoC container | |
| $ioc = new \Illuminate\Container\Container; |