(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| // Index: | |
| r.table("heroes").indexCreate("idEquipment", function(doc) { | |
| return doc("equipment").map(function(equipment) { | |
| return [doc("id"), equipment] | |
| }) | |
| }, {multi: true}).run(conn, callback) | |
| // Query | |
| r.table("heroes").getAll([1, "boots"], {index: "idEquipment"}).run(conn, callback) |
| # MAC manipulators | |
| alias random_mac='sudo ifconfig en0 ether `openssl rand -hex 6 | sed "s/\(..\)/\1:/g; s/.$//"`' | |
| alias restore_mac='sudo ifconfig en0 ether YOUR_ORIGINAL_MAC_ADDRESS_GOES_HERE' |
| from django.db import models | |
| from django.utils.decorators import wraps | |
| from django.core.exceptions import ValidationError | |
| def constraint(func): | |
| @wraps(func) | |
| def inner(*args, **kwargs): | |
| func._is_constraint = True | |
| return func(*args, **kwargs) | |
| return inner |