Real-space renormalization group calculations for spin glasses and dilute magnets