Skip to content

Instantly share code, notes, and snippets.

View diogocapela's full-sized avatar

Diogo Capela diogocapela

View GitHub Profile
@tunguskha
tunguskha / CSS-color-var.md
Last active May 20, 2024 06:21
Darken & Lighten colors in pure CSS using variables.
:root {
  /* Base color using HSL */
  --hue: 207;
  --saturation: 64%;
  --light: 44%;
  
  /* Base color in variable */
  --primary-color: hsl(var(--hue), var(--saturation), var(--light));
 /* Base color lighten using calc */
@joepie91
joepie91 / getting-started.md
Last active July 7, 2024 02:41
Getting started with Node.js

"How do I get started with Node?" is a commonly heard question in #Node.js. This gist is an attempt to compile some of the answers to that question. It's a perpetual work-in-progress.

And if this list didn't quite answer your questions, I'm available for tutoring and code review! A donation is also welcome :)

Setting expectations

Before you get started learning about JavaScript and Node.js, there's one very important article you need to read: Teach Yourself Programming in Ten Years.

Understand that it's going to take time to learn Node.js, just like it would take time to learn any other specialized topic - and that you're not going to learn effectively just by reading things, or following tutorials or courses. _Get out there and build things!

@joepie91
joepie91 / closures.js
Last active October 14, 2018 05:54
Javascript Closures illustrated
functionCreator = function(favouriteNumber) {
return function(inputNumber) { // <-- This function is a closure!
console.log("You input the number " + inputNumber + ", and your favourite number is " + favouriteNumber + ".");
if(inputNumber === favouriteNumber) {
console.log("Those are the same number!");
} else {
console.log("Those are NOT the same number!");
}
}
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active December 5, 2024 01:19
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k