Skip to content

Instantly share code, notes, and snippets.

View danielkpodo's full-sized avatar
💭
Open for Dev opportunities

Daniel Narh danielkpodo

💭
Open for Dev opportunities
View GitHub Profile
@danielkpodo
danielkpodo / sequelize-cheatsheet.md
Created June 22, 2023 11:44 — forked from bgoonz/sequelize-cheatsheet.md
sequelize-cheat-sheetmd

Sequelize Cheatsheet

Command Line

Sequelize provides utilities for generating migrations, models, and seed files. They are exposed through the sequelize-cli command.

Init Project

$ npx sequelize-cli init
@danielkpodo
danielkpodo / week-generator.js
Last active May 2, 2021 17:24
A function to generate week numbers given start date and number of months
import moment from "moment";
const startDate = "2020-09-23";
const months = 6;
const getWeeks = (weekRanges) => {
const weekNumbers = [];
weekRanges.forEach((date) => {
weekNumbers.push(moment(date.begin, date.end).week());
});
Zen Of Javascript
Build functionality, not architecture.
Build small things that work
and glue them together to make big things.
Clear is better than clever,
but graceful beats both.
Comments are good, even if you're Dutch.
Asychronous is better than synchronous
except for when it isn't
@danielkpodo
danielkpodo / nodejs-directory-structure.md
Created March 24, 2020 18:50 — forked from miguelmota/nodejs-directory-structure.md
Node.js MVC directory structure example.
Node.js MVC directory structure example.
├── app
│   ├── controllers
│   │   ├── admin
│   │   │   ├── posts.js
│   │   │   └── users.js
│   │   ├── posts.js
│ │ ├── session.js