Skip to content

Instantly share code, notes, and snippets.

View rodel77's full-sized avatar
💻
Coding

rodel77 rodel77

💻
Coding
View GitHub Profile
@qassa
qassa / Java lerp
Last active May 2, 2017 07:41
lerp realization in Java using interpolation by time. Ability to set determine speed of object when it's moving on the straight line (X,Y) on the scene.
public int lerp(float start, float target, float duration, float timeSinceStart){
float value = start;
if(timeSinceStart>=0.0f && timeSinceStart < duration){
float range = target - start;
float percent =timeSinceStart / duration;
value = start + range * percent;
}
else if(timeSinceStart>=duration)
value = target;
return Math.round(value);
@willurd
willurd / web-servers.md
Last active June 17, 2024 09:38
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000