Scaling Magento presentation with 60 slides and notes, which was then reviewed by Alan Storm.
Show all commits that are in oldbranch, but not in new branch | |
git log --no-merges oldbranch ^newbranch |
/* | |
* DJBX33A (Daniel J. Bernstein, Times 33 with Addition) | |
* | |
* This is Daniel J. Bernstein's popular `times 33' hash function as | |
* posted by him years ago on comp.lang.c. It basically uses a function | |
* like ``hash(i) = hash(i-1) * 33 + str[i]''. This is one of the best | |
* known hash functions for strings. Because it is both computed very | |
* fast and distributes very well. | |
* | |
* The magic of number 33, i.e. why it works better than many other |
This is a git pre-push hook intended to help developers keep their PHP code base clean by performing a scan with PHP CodeSniffer whenever new code is pushed to the repository. When any coding standards violations are present the push is rejected, allowing the developer to fix the code before making it public.
To increase performance only the changed files are checked when new code is
## Magento 1 + SampleData
sudo apt-get update && \
sudo apt-get install -y git wget unzip
git clone https://github.com/OpenMage/magento-mirror.git ./ ;
wget https://raw.githubusercontent.com/Vinai/compressed-magento-sample-data/1.9.1.0/compressed-magento-sample-data-1.9.1.0.tgz ;
Preconditions:
- Have xdebug configured on PHPStorm.
- Installed N98-magerun. Github repository
In command line, run following command first time (with same server name as configured in PHPStorm):
export PHP_IDE_CONFIG="serverName=localhost.tld" export XDEBUG_CONFIG="idekey=PHPSTORM"
#!/bin/sh | |
# deploy.sh | |
N="`readlink \"$1\"`" | |
mv -T "$1.stage" "$1" | |
ln -s "$N" "$1.stage" | |
rm -rf "$N" | |
cp -aH "$1" "$N" |
Below are the actual files we use in one of our latest production applications at Agora Games to achieve zero downtime deploys with unicorn. You've probably already read the GitHub blog post on Unicorn and would like to try zero downtime deploys for your application. I hope these files and notes help. I am happy to update these files or these notes if there are comments/questions. YMMV (of course).
Other application notes:
- Our application uses MongoDB, so we don't have database migrations to worry about as with MySQL or postgresql. That does not mean that we won't have to worry about issues with the database with indexes being built in MongoDB or what have you.
- We use capistrano for deployment.
Salient points for each file:
# Nginx+Unicorn best-practices congifuration guide. Heartbleed fixed. | |
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies. | |
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module | |
# | |
# Deployment structure | |
# | |
# SERVER: | |
# /etc/init.d/nginx (1. nginx) | |
# /home/app/public_html/app_production/current (Capistrano directory) | |
# |