most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
function parse_git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
NO_COLOUR="\[\033[0m\]" | |
PS1="$GREEN\u@machine$NO_COLOUR:\w$YELLOW\$(parse_git_branch)$NO_COLOUR\$ " |
<?php | |
/* @var $installer Mage_Eav_Model_Entity_Setup */ | |
$installer = Mage::getModel('eav/entity_setup', 'default_setup'); | |
$installer->startSetup(); | |
// Example createEntityTables() call | |
$installer->createEntityTables('example_supplier'); |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
1) First you need to generate download token. Login to your account on magento.com and generate it in Account Settings->Downloads Access Token | |
2) You will need your MAGEID as well. It is shown at the top-left in your account page. | |
3) curl -k https://MAGEID:TOKEN@www.magentocommerce.com/products/downloads/info/help | |
4) Profit! |
The following will guide you through the process of enabling SSL on a Apache webserver
Create a directory within /etc/apache2/
using Terminal.app: sudo mkdir /etc/apache2/ssl
Next, generate two host keys:
[mysqld] | |
## After edit config you have to remove log files and restart mysql server | |
## because after changing innodb-log-file-size you should recreate ib_logfiles | |
## Stop MySQL server | |
## rm /data/dir/ib_logfile* | |
## Run MySQL server | |
##Table open cache under MacOS and MySQL 5.6 should be 250. | |
##Otherwise you will get error MySQL server has gone away | |
##table-open-cache = 250 |
The first kata is the classic BowlingGame Kata from Uncle Bob.
Write a class named
Game
that has two methods
roll(pins : int)
is called each time the player rolls a ball. The argument is the number of pins knocked down.score()
: int is called only at the very end of the game. It returns the total score for that game.
Here is the original PowerPoint from Uncle Bob with the instructions including the solution steps. The PPT file also includes the rules for the scoring of a bowling game.
<?php | |
require_once 'abstract.php'; | |
class Cmtickle_Demo_Shell_Tool extends Mage_Shell_Abstract | |
{ | |
private $_readConnection = null; | |
protected function _getReadConnection() | |
{ |