Skip to content

Instantly share code, notes, and snippets.

View steveRoll-git's full-sized avatar
🍊

Ron Tseytlin steveRoll-git

🍊
View GitHub Profile
@steveRoll-git
steveRoll-git / main.lua
Created September 17, 2022 19:26
löve - fluid simulation using verlet integration
local love = love
local lg = love.graphics
local random = love.math.random
local function dist(x1, y1, x2, y2)
return math.sqrt((x2 - x1)^2 + (y2 - y1)^2)
end
local function length(x, y)
return math.sqrt(x^2 + y^2)
end
@steveRoll-git
steveRoll-git / bandcampPopularityVis.js
Last active February 7, 2021 21:44
Bandcamp Track Popularity Visualizer
{
function colorSongs(){
let elements = document.getElementsByClassName("fav-track")
let score = {}
let maxScore = 0
for(let i=0; i<elements.length; i++){
let e = elements[i];
let name = e.innerText.substring(16, e.innerText.length-1)
score[name] = score[name] == null ? 0 : score[name]
maxScore = Math.max(maxScore, score[name])