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
function chWpUrl() | |
{ | |
db=$1 | |
from=$2 | |
to=$3 | |
request="UPDATE wp_options SET option_value = REPLACE(option_value, '$from', '$to'); | |
UPDATE wp_posts SET guid = REPLACE(guid, '$from', '$to'); | |
UPDATE wp_posts SET post_content = REPLACE(post_content, '$from', '$to'); | |
UPDATE wp_comments SET comment_author_url = REPLACE(comment_author_url, '$from', '$to'), | |
comment_content = REPLACE(comment_content, '$from', '$to') |
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
# Development - MAGENTO | |
# ==================================================== | |
# Retrieve magento extension from Magento Connect 2.0 | |
function getmage() | |
{ | |
# Usage example for http://connect20.magentocommerce.com/community/Fooman_Speedster-2.0.8 : | |
# getmage community Fooman_Speedster 2.0.8 | |
wget --directory-prefix=$HOME/Downloads/ http://connect20.magentocommerce.com/$1/$2/$3/$2-$3.tgz | |
} |
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
toDev () { | |
if [[ $# < 2 ]]; then | |
echo "Usage: toDev <db name> <website name>"; | |
return 1 | |
fi | |
db=$1 | |
shift | |
NAME=$@ | |
req=" | |
UPDATE core_config_data SET scope = 'default', scope_id = '0', path = 'dev/jbh_notice/admin_message', value = '$NAME - Development Admin Panel' WHERE path = 'dev/jbh_notice/admin_message'; |
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"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>fr.jacquesbh.apache2</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/apache2/bin/apachectl</string> | |
<string>start</string> |
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 | |
/** | |
* Email Model | |
* @package Jbh_Demo | |
*/ | |
class Jbh_Demo_Model_Email extends Mage_Core_Model_Abstract | |
{ | |
/** |
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 | |
declare(ticks = 1); | |
// Mage ! | |
require_once __DIR__ . '/../app/Mage.php'; | |
// Usage function :) | |
function usage() | |
{ |
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" ?> | |
<!-- | |
/** | |
* This file is part of Jbh_Webservice for Magento. | |
* | |
* This program is free software. It comes without any warranty, to | |
* the extent permitted by applicable law. You can redistribute it | |
* and/or modify it under the terms of the Do What The Fuck You Want | |
* To Public License, Version 2, as published by Sam Hocevar. See | |
* http://sam.zoy.org/wtfpl/COPYING for more details. |
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
echo trim(preg_replace_callback('/(.)(.)/isU', function ($matches) { | |
return strtoupper($matches[1]) . strtolower($matches[2]); | |
}, $txt)); |
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
http://sam.zoy.org/wtfpl/COPYING |