Notes on homological algebra and representations of Lie algebras