Skip to content

Instantly share code, notes, and snippets.

View rezkam's full-sized avatar
👋

Rez rezkam

👋
  • Sweden
  • 05:02 (UTC +02:00)
View GitHub Profile
@ashkantaravati
ashkantaravati / UniversityProfRandScoreGen.js
Last active June 11, 2019 05:50
I was too lazy and tired to answer all the professor survey questions so I wrote this!
var matches = [].slice.call(document.querySelectorAll('[id^=DropDownList]'));//Gets all dropdown selectors in an array
for (var i=0;i<matches.length;i++){//iterate through dropdownlists
//** random number generator part
var min = Math.ceil(2);
var max = Math.floor(6);
var randscore=Math.floor(Math.random() * (max - min)) + min;
//** random number generator part ends
matches[i].selectedIndex=randscore.toString();// set scores
}//we're done
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active July 18, 2026 00:17
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).