add code and attribute definitions

Signed-off-by: Suhayb El Wardany <me@suw.me>