- Update HISTORY.md
- Commit the changes:
git add HISTORY.md
git commit -m "Changelog for upcoming release 0.1.1."
- Update version number (can also be minor or major)
bumpversion patch
####################### | |
# Setup | |
####################### | |
mkdir annex-test | |
cd annex-test | |
git init | |
git annex init master | |
####################### | |
# Fab setup task |
export VERSION="3.7.1" | |
xcode-select --install | |
brew update | |
brew upgrade | |
brew install zlib | |
brew reinstall zlib | |
export LDFLAGS="-L/usr/local/opt/zlib/lib" | |
export CPPFLAGS="-I/usr/local/opt/zlib/include" | |
pyenv install $VERSION | |
pyenv global $VERSION |
# settings.py | |
TEMPLATE_CONTEXT_PROCESSORS = ( | |
'django.core.context_processors.i18n', | |
) | |
# urls.py (outside i18n_patterns) | |
(r'^i18n/', include('django.conf.urls.i18n')), |
// http://compass-style.org/reference/compass/helpers/sprites/ | |
@mixin get-sprite($map, $sprite, $repeat: no-repeat, $height: true, $width: true) { | |
//http://compass-style.org/reference/compass/helpers/sprites/#sprite-file | |
$sprite-image: sprite-file($map, $sprite); | |
// http://compass-style.org/reference/compass/helpers/sprites/#sprite-url | |
$sprite-map: sprite-url($map); | |
// http://compass-style.org/reference/compass/helpers/sprites/#sprite-position |
from datetime import datetime | |
import pytz | |
def is_dst (): | |
"""Determine whether or not Daylight Savings Time (DST) | |
is currently in effect""" | |
x = datetime(datetime.now().year, 1, 1, 0, 0, 0, tzinfo=pytz.timezone('US/Eastern')) # Jan 1 of this year | |
y = datetime.now(pytz.timezone('US/Eastern')) |
from django.db.models.fields import Field | |
import types | |
def patch_model(model_to_patch, class_to_patch_with): | |
""" | |
Adapted from http://www.ravelsoft.com/blog/2010/patchmodel-hacky-solution-extending-authuser-class | |
Monkey patch a django model with additional or replacement fields and methods. | |
All fields and methods that didn't exist previously are added. |
git add HISTORY.md
git commit -m "Changelog for upcoming release 0.1.1."
bumpversion patch
To copy database from one heroku app to another -
heroku pg:backups capture [database_name]
heroku pg:backups restore $(heroku pg:backups public-url --app source_app) DATABASE_URL --app target_app
You can refer to https://devcenter.heroku.com/articles/heroku-postgres-backups for more information.
To copy database from local to heroku -
Dump your local database in compressed format using the open source pg_dump tool: PGPASSWORD=mypassword pg_dump -Fc --no-acl --no-owner -h localhost -U myuser mydb > mydb.dump
where myuser
is your database username and mydb
is the database name.
* |
This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.
I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.