Snippets Collections
npm init
npm install express express-generator exlint nodemon


// In package,json
"scripts": {
  ...
  "start": "node ./bin/www",
  "devstart": "nodemon ./bin/www",
  "serverstart": "DEBUG=express-locallibrary-tutorial:* npm run devstart"
  "lint": "eslint src/js"
  ...
}
  
// Express Skeleton using express-generator
express <appnam> --view=pug
cd <appname>
npm install
- Linux: 		DEBUG=express-locallibrary-tutorial:* npm start
- Powershell: 	DEBUG=express-locallibrary-tutorial:* npm start

const mongoose = require("mongoose");
const Schema = mongoose.Schema;
const dateFormat = require("dateformat");

const AssignmentSchema = new Schema({
  title: { type: String, required: true },
  description: { type: String, required: true },
  deadline: { type: date, required: true },
});

AssignmentSchema.virtual("date").get(function () {
  return dateFormat(this.timestamp, "mmmm dS, yyyy, h:MM:ss TT");
});

module.exports = mongoose.model("Assignment", AssignmentSchema);
/* Vertically Centering Text */
.parent {
  position: relative;
}

.child {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

/* Horizontally Center */
.text {
  text-align: center;
}
/*EX:.container {
    padding: 0 15px;
// 576px window width and more
    @include sm {
        padding: 0 20px;
    }
// 992px window width and more
    @include lg {
        margin-left: auto;
        margin-right: auto;
        max-width: 1100px;
    } */
 
// Small tablets and large smartphones (landscape view)
$screen-sm-min: 576px;
 
// Small tablets (portrait view)
$screen-md-min: 768px;
 
// Tablets and small desktops
$screen-lg-min: 992px;
 
// Large tablets and desktops
$screen-xl-min: 1200px;
 
 
// Small devices
@mixin sm {
   @media (min-width: #{$screen-sm-min}) {
       @content;
   }
}
 
// Medium devices
@mixin md {
   @media (min-width: #{$screen-md-min}) {
       @content;
   }
}
 
// Large devices
@mixin lg {
   @media (min-width: #{$screen-lg-min}) {
       @content;
   }
}
 
// Extra large devices
@mixin xl {
   @media (min-width: #{$screen-xl-min}) {
       @content;
   }
}
theme-01: Primary(#0A192F), Secondary(#64FFDA), Font-1(#CCD6F6), Font-2(#8892B0)
div {
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

html {
    background-color: peachpuff;
footer {
  /* fixed bottom */
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
}
.gradient {
  background-image:
    radial-gradient(
      yellow,
      #f06d06
    );
}
/* Linear gradient pattern */

.repeat {
  background-image: 
    repeating-linear-gradient(
      45deg,
      yellow,
      yellow 10px,
      red 10px,
      red 20px /* determines size */
    );
}

/* Radial gradient pattern */

.repeat {
  background: 
    repeating-radial-gradient(
      circle at 0 0, 
      #eee,
      #ccc 50px
    );
}
.gradient {
  background-image:
    linear-gradient(
      to right, 
      red, 
      blue,
      yellow, 
      green
    );
}
star

Thu Sep 23 2021 14:46:24 GMT+0000 (UTC)

#css #design #center
star

Sat Sep 04 2021 14:16:04 GMT+0000 (UTC) https://www.thiscodeworks.com/5f97b1080c7c1200148d470b

#css #design #colors
star

Sat Sep 04 2021 14:13:57 GMT+0000 (UTC)

#css #design #colors
star

Fri Sep 03 2021 10:50:58 GMT+0000 (UTC)

#css #footer #design
star

Tue Aug 17 2021 16:37:54 GMT+0000 (UTC) https://rust-unofficial.github.io/patterns/intro.html

#rust #design #patterns
star

Wed Jul 28 2021 13:42:21 GMT+0000 (UTC) https://blog.suhailkakar.com/best-design-resources-for-developers

#design #ui
star

Fri Jan 10 2020 19:00:00 GMT+0000 (UTC) https://css-tricks.com/snippets/css/css-radial-gradient/

#css #design #gradient #webdev
star

Wed Jan 08 2020 19:00:00 GMT+0000 (UTC) https://css-tricks.com/snippets/css/css-repeating-gradients/

#css #webdev #design #gradients

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension