Skip to content

Instantly share code, notes, and snippets.

View 8bitspixel's full-sized avatar
:octocat:
I may be slow to respond.

Pani 8bitspixel

:octocat:
I may be slow to respond.
View GitHub Profile
@8bitspixel
8bitspixel / 0_reuse_code.js
Created September 3, 2016 23:38
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@8bitspixel
8bitspixel / days_until_birthday.md
Last active February 24, 2023 02:51
Calculate the days until your next birthday with MomentJS

Next birthday with momentJs:

DaysUntil accepts a momentJS object with a birthday date which returns amount of days left

##Using a momentJS object with the day of your next birthday

function daysUntil(date) {
  var birthday = moment(date);
  var today = moment().format("YYYY-MM-DD");

if (birthday.isSame(today)) {