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
# Restore a database | |
function restore() | |
{ | |
if [[ $# < 2 ]]; then | |
echo "Usage: restore <database> <file.sql[.tar].gz> [-gz]" | |
echo "Use -gz option if you want to restore an only gziped file" | |
return 65 | |
fi | |
if [[ -f $2 ]]; then |
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
# Prompt | |
# Get the branch name of the current directory | |
git_branch() | |
{ | |
if git rev-parse --git-dir >/dev/null 2>&1 ; then | |
gitver=$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p') | |
else | |
return 0 | |
fi | |
if [[ $# == 1 ]]; then |
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 |
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 Jbh; | |
class Counter | |
{ | |
use \Jbh\Db; | |
protected $_cache = []; | |