Skip to content

Instantly share code, notes, and snippets.

Hyped for TLOU Part II

Loris Bettazza Pustur

Hyped for TLOU Part II
Block or report user

Report or block Pustur

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Pustur / unique-dom-elements.js
Last active Apr 3, 2019
JavaScript – Return an object of all the html tag names and the number of times they appear in the document
View unique-dom-elements.js
const uniqueDomElements = () =>
(obj, { tagName }) => {
obj[tagName] = obj[tagName] + 1 || 1;
obj._total += 1;
return obj;
{ _total: 0 }
Pustur / daily-ui.txt
Created Jun 19, 2016
DailyUI – A list of design challenges
View daily-ui.txt
Sign Up
Credit Card Checkout
Landing Page (above the fold)
App Icon
User Profile
404 page
Music Player
Social Share
Pustur / timestamp-to-string.js
Last active Aug 26, 2019
JavaScript – Convert a timestamp to a string "X days X hours X minutes X seconds X milliseconds". Useful to show elapsed time since [event]
View timestamp-to-string.js
function timestampToString(timestamp, useMilliseconds) {
const periods = {
day: 86400000,
hour: 3600000,
minute: 60000,
second: 1000,
millisecond: 1,
if (!useMilliseconds) {
You can’t perform that action at this time.