Skip to content

Instantly share code, notes, and snippets.

View mechmillan's full-sized avatar
💭
👨‍💻

Alfonso Millan mechmillan

💭
👨‍💻
  • @giantmachines
View GitHub Profile
@mechmillan
mechmillan / feedback.md
Created March 1, 2022 14:11
Feedback Ladders
@mechmillan
mechmillan / pull_request_template.md
Created March 1, 2022 14:09
Pull Request Template

Problem

What is the problem this work solves, including Link to story or ticket

Solution

What I/we did to solve this problem

with @pairperson1

<a href="mailto:[email protected]">Contact customer support</a>
interface ScanResult {
is_spam: boolean;
message: string;
results: {
classification: Object;
phishing: Array;
executables: Array;
arbitrary: Array;
};
links: Array;
// in a file called index.js
const fs = require("fs");
const path = require("path");
// Make sure to install spamscanner in your package.json
const SpamScanner = require("spamscanner");
const scanEmail = async () => {
// For a list of all options & their defaults, see:
// https://www.npmjs.com/package/spamscanner#api
const scanner = new SpamScanner({ debug: true });
interface ParsedMail {
attachments: Attachment[];
bcc?: AddressObject | AddressObject[];
cc?: AddressObject | AddressObject[];
date?: Date;
from?: AddressObject;
headerLines: HeaderLines;
headers: Headers;
html: string | false;
inReplyTo?: string;
@mechmillan
mechmillan / index.js
Created February 25, 2021 14:20
Email Blog Post - Sample Code
// in a file called index.js
const fs = require('fs');
const path = require('path');
// Make sure to install spamscanner in your package.json
const SpamScanner = require('spamscanner');
const scanEmail = async () => {
// For a list of all options & their defaults, see:
// https://www.npmjs.com/package/spamscanner#api
const scanner = new SpamScanner({ debug: true });
{
"name": "run-git-log-with-npx-from-gist",
"version": "1.0.0",
"scripts": {
"set-global": "git config --global grep.extendedRegexp true",
"format-commits": "git log --pretty=format:"%h%x09%d%x09%an%x09%ad%x09%s" --no-merges --date=short --author="Alfonso" | commits.txt",
"log-unix": "npm run set-global && npm run format-commits",
},
}
@mechmillan
mechmillan / cloudSettings
Last active December 14, 2021 18:45
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-12-14T18:45:31.719Z","extensionVersion":"v3.4.3"}
@mechmillan
mechmillan / mb_code.js
Created February 13, 2019 13:51
Setup for MB
// in basic server.js
// mount express-graphql on '/graphql' as a route-handler
app.use(
GRAPHQL_ENDPOINT,
graphqlHTTP(req => {
// STEP 5: define your resolvers
// batch loading functions
// accepting an array of keys and returning
// promises that resolve to an array of values