Skip to content

Instantly share code, notes, and snippets.

View ramidem's full-sized avatar
:octocat:
Training to be a ninja

Med Aduh ramidem

:octocat:
Training to be a ninja
View GitHub Profile
@SanderTheDragon
SanderTheDragon / postman-deb.sh
Last active May 25, 2024 09:02
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
#!/bin/sh
# SPDX-FileCopyrightText: 2017-2024 SanderTheDragon <sanderthedragon@zoho.com>
#
# SPDX-License-Identifier: MIT
arch=$(dpkg --print-architecture)
echo "Detected architecture: $arch"
case "$arch" in
@pasupulaphani
pasupulaphani / after_res_hooks.js
Last active May 1, 2024 20:37
Mongoose connection best practices
var db = mongoose.connect('mongodb://localhost:27017/DB');
// In middleware
app.use(function (req, res, next) {
// action after response
var afterResponse = function() {
logger.info({req: req}, "End request");
// any other clean ups