Skip to content

Instantly share code, notes, and snippets.

View RalucaNicola's full-sized avatar
🌍

Raluca Nicola RalucaNicola

🌍
View GitHub Profile
/*
Here are some short exercises to give you extra practice writing SCSS, and especially with refactoring regular CSS into SCSS.
You can double-check your SCSS by plugging it into Sassmeister, and see if the compiled CSS matches the starting point code:
http://www.sassmeister.com/
The Sass documentation is a great resource and can be found here: http://sass-lang.com/documentation/
*/
/*
Example - Write the following CSS using nested rules:
@miguelmota
miguelmota / getDates.js
Last active February 7, 2024 23:43
Get dates in between two dates with JavaScript.
// Returns an array of dates between the two dates
function getDates (startDate, endDate) {
const dates = []
let currentDate = startDate
const addDays = function (days) {
const date = new Date(this.valueOf())
date.setDate(date.getDate() + days)
return date
}
while (currentDate <= endDate) {
@ded
ded / directory-size.js
Created March 5, 2011 10:16
a simple node script to determine the size of any directory on a file system
/**
* usage
* DIR='public/js' node directory-size.js
* => "size of public/js is: 12,432
*/
var fs = require('fs'),
_ = require('./underscore'); // requires underscore for _.flatten()
function format(n) {