Hybrid thermomagnetic oscillator for cooling and direct waste heat conversion to electricity