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/sh | |
# based on http://john.albin.net/git/convert-subversion-to-git with a some tweeks | |
# (NB: its quick and dirty, has no error checking and only works on repos structured with a stdlayout i.e. a trunk folder) | |
# use: | |
# | |
# $:./svn-to-git.sh new-repo-name http://user@server/repo/ | |
BARE_REPO_NAME="$1" | |
SVN_PATH="$2" |
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
SELECT `post_type`,COUNT(*) FROM `wp_posts` GROUP BY `post_type`; |
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
<? | |
# Prepare the location of the slider's folder to enable movement accross folders | |
// $path = dirname(__FILE__); | |
// $path = str_replace('\\', '/', $path); | |
// $path = str_replace(str_replace('\\', '/', ABSPATH), '', $path); | |
// $path = trailingslashit(site_url()) . $path; | |
// $path = trailingslashit($path); | |
# Fix wrong path code! | |
$file = str_replace('\\','/', dirname(__FILE__)); // sanitize for Win32 installs |
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 // only add this line if you need to! i.e. the file is blank.. and doesnt already start with <?php | |
/** | |
* print_custom_html_code_head | |
* @return void | |
*/ | |
add_action("init", "fix_launch_pad" , 1); | |
function fix_launch_pad() | |
{ | |
global $woodojo_launch_pad; |
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 | |
namespace Tests; | |
use Swift_Message; | |
trait EmailAsserts | |
{ | |
protected $emails = []; |
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 | |
if( !function_exists('apache_request_headers') ) { | |
function apache_request_headers() { | |
$arh = array(); | |
$rx_http = '/\AHTTP_/'; | |
foreach($_SERVER as $key => $val) { | |
if( preg_match($rx_http, $key) ) { | |
$arh_key = preg_replace($rx_http, '', $key); | |
$rx_matches = array(); | |
// do some nasty string manipulations to restore the original letter case |