Skip to content

Instantly share code, notes, and snippets.

@mikermcneil
mikermcneil / principles-for-delivering-professional-services.md
Last active November 17, 2022 04:12
Principles for delivering professional services

Principles for delivering professional services

mikermcneil, 2022-08-10

A few principles for delivering a great customer experience and successfully completing professional services engagements. The following are lessons that I had to learn the hard way. Hopefully, they save you some trouble!

  1. Daily communication with the customer (like a standup during the engagement)
  2. Timebox the engagement (ok to scope features, but also set a timeframe.)
  3. Make it explicit who is working on it and how many hours they'll be working per week.
  4. Do frequent demos during the project (weekly or biweekly). If the customer doesn't show, demo internally anyways. Fix bugs that come up in the demos before moving on. Fri morning or Thu afternoon demos work best, to leave time for bug fixes before the week (and sometimes project timeframe) ends.
@mikermcneil
mikermcneil / do-i-need-queues-in-nodejs.md
Created January 17, 2022 02:30
Do I need queueing in Node.js / Sails.js?

Question

So I guess in Rails and Laravel world queues and background jobs are really all front and center but I don't hear that mentioned even moderately in Node. What will be the equivalent?

Answer

Mike McNeil sent the following messages at 8:21 PM

The equivalent is like what's in the sendTemplateEmail() helper in default new sails apps, at the bottom

I know of a couple of valid reasons to use queues in Node.js:

@sindresorhus
sindresorhus / esm-package.md
Last active May 4, 2024 13:56
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@Jiab77
Jiab77 / upgrade-systemd-on-ubuntu-18.04.md
Last active December 11, 2023 20:18
Upgrade systemd on Ubuntu 18.04

Upgrade systemd on Ubuntu 18.04

In this document, I will explain how to upgrade the default systemd version from 237 to 242.

The main reason why I needed this was related to the DNS-over-TLS that was not supported in the version 237 but available from version 242.

Later, when playing with Lynis, the security auditing tool, I then discovered that the version 242 was also providing the command systemd-analyze that is used by lynis to detect if existing systemd services are configured correctly in the security context, meaning that the existing services can run as expected but needs few or several changes in their configuration to make them safe without any exploitable attack surfaces.

You can try it once you've installed the version 242 of systemd that way:

@RajaniCode
RajaniCode / MongoDB
Last active November 4, 2023 00:05
MongoDB
mongod --version
#MongoDB Default Directory: "/<root>/db/data" viz. "/c/db/data" #OR "<Root>:\db\data" viz. "C:\db\data"
rm -rf "/e/WT" #OR rm -rf "E:\WT"
mkdir -p "/e/WT" #OR mkdir -p "E:\WT"
#MongoDB Server #runserver #mongod -dbpath <Directory>/WT --storageEngine <storage engine>
@callumlocke
callumlocke / .zshrc
Last active March 24, 2024 08:12
ZSH function to auto-switch to correct Node version
####
# ZSH function to auto-switch to correct Node version
# https://gist.github.com/callumlocke/30990e247e52ab6ac1aa98e5f0e5bbf5
#
# - Searches up your directory tree for the closest .nvmrc, just like `nvm use` does.
#
# - If you are already on the right Node version, IT DOES NOTHING, AND PRINTS NOTHING.
#
# - Works correctly if your .nvmrc file contains something relaxed/generic,
# like "4" or "v12.0" or "stable".
@frow
frow / express-ws-proxy.ts
Last active August 13, 2019 17:01
express + express.ws + node-http-proxy
import * as httpProxy from 'http-proxy';
import * as express from 'express';
import * as expressWs from 'express-ws';
import * as WebSocket from 'ws';
import * as cookieParser from 'cookie-parser';
const proxy = httpProxy.createProxyServer({
});
const httpServer = express();
@takeseem
takeseem / a2dp
Last active October 26, 2022 00:34
Fixing bluetooth headset problem in xubuntu 16.04.
#!/bin/bash
# headset mac
mac="00:1D:DF:67:0A:29"
profile="a2dp"
# Special Bluetooth controller
btMac=""
# connect|disconnect wait time
waitTime=5
macId="${mac//:/_}"
@mikermcneil
mikermcneil / naming-conventions-for-plugins-and-sails-core-modules.md
Last active March 10, 2017 21:11
The naming convention for Sails plugins and core modules.

Branches / NPM dist tags

The git branch and NPM dist tag for a particular package are based on the Sails version they're intended to be run with. For example:

NPM dist tag Recommended branch name where hotfixes should be done Example of most recent release on branch
edge master 22.45.38-4
@venator85
venator85 / asuswrt-route53.sh
Created January 26, 2017 22:05
Custom AsusWRT DDNS script for AWS Route53
#!/bin/sh
# note: when debugging on PC/MAC, this script must be run with bash
# Custom AsusWRT DDNS script for AWS Route53 - v1.0
# Author: Alessio Bianchi <me@alessiobianchi.eu>
# Credits: http://czak.pl/2015/09/15/s3-rest-api-with-curl.html
ACCESS_KEY_ID="XXXXXXXXXXXXXXXXXXXX"
SECRET_ACCESS_KEY="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# These keys can be associated to a IAM user with the following policy: