Skip to content

Instantly share code, notes, and snippets.

View mrhm-dev's full-sized avatar
🏠
Working from home

HM Nayem mrhm-dev

🏠
Working from home
View GitHub Profile
@gokulkrishh
gokulkrishh / media-query.css
Last active June 28, 2024 09:07
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@joshnuss
joshnuss / app.js
Last active March 4, 2024 00:01
Express.js role-based permissions middleware
// the main app file
import express from "express";
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db)
import authenticate from "./authentication"; // middleware for doing authentication
import permit from "./authorization"; // middleware for checking if user's role is permitted to make request
const app = express(),
api = express.Router();
// first middleware will setup db connection