See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| // based on this answer 'http://stackoverflow.com/a/36016798' | |
| class LeftAlignedCollectionViewFlowLayout: UICollectionViewFlowLayout { | |
| override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? { | |
| let attributes = super.layoutAttributesForElements(in: rect) | |
| var leftMargin = sectionInset.left | |
| var maxY: CGFloat = -1.0 | |
| attributes?.forEach { layoutAttribute in | |
| if layoutAttribute.frame.origin.y >= maxY { |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
https://docs.djangoproject.com/es/1.9/topics/i18n/timezones/#troubleshooting
import datetime
from django.utils import timezone
# Return datetime now with UTC
naive = datetime.datetime.utcnow()
# Return datetime now with timezone| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
| import UIKit | |
| import StoreKit | |
| //MARK: SKProductsRequestDelegate | |
| extension IAPHelpers : SKProductsRequestDelegate | |
| { | |
| func productsRequest(request: SKProductsRequest, didReceiveResponse response: SKProductsResponse) | |
| { |
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.