Some usefull after Effects clips I comonly use.
// Generate a random value and hold it for x Seconds
holdTime = 8; //time to hold each position (seconds)
maxVal = 100;
seed = Math.floor(time/holdTime);
seedRandom(seed,true);
random(maxVal);
// Ramp Value from0 to Modulo
Modo = 360;
frModo = timeToFrames(t = time + thisComp.displayStartTime, fps = 1.0 / thisComp.frameDuration, isDuration = false)%Modo;
hueShift = frModo;
hueShift;
// Loopy Loop
//( with two keyframe aka timeremap loop)
loopOut(type = "cycle", numKeyframes = 0);
loopOut();
// -> elsewise change the numKeyframes to reflect the interval choosen.