Skip to content

Instantly share code, notes, and snippets.

Avatar

Bryan Forbes bryanforbes

View GitHub Profile
View email.md

Postfix Hardening for MX Guarddog

For this guide, the following assumptions are made:

  • MX Guarddog is being used to filter spam
  • MX records have been set to MX Guarddog's servers
  • Postfix successfully receives and delivers mail from MX Guarddog's servers

After following the instructions at MX Guarddog for setting up the MX records, email addresses, email server, and quarantine reports, everything should Just Work™. Spam should slow to a trickle; MX Guarddog does a really good job of spam filtering! The only thing they can't protect against is spammers that ignore the MX records of a server and try to connect directly to the server. For that, some configuration will need to be done. In addition to this, we'll also prevent submitting email on port 25 and only allow it on the submission port (587).

View propertyDecorator.js
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);
case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);
}
};
function enumerable(enumerable) {
if (enumerable === void 0) { enumerable = true; }
@bryanforbes
bryanforbes / __init__.pyi
Created April 5, 2020 19:49
Reproduction for mypy 8481
View __init__.pyi
from .user import User as User, ClientUser as ClientUser
from .channel import *
from .message import Message as Message
from . import abc
View keybase.md

Keybase proof

I hereby claim:

  • I am bryanforbes on github.
  • I am bryanforbes (https://keybase.io/bryanforbes) on keybase.
  • I have a public key ASCW5FzcK3rMcZwjVYscQO_o43x4bZ-iZ8PGs9YhCfhpzQo

To claim this, I am signing this object:

View pyproject.toml
[tool.poetry]
name = "test"
version = "0.1.0"
description = ""
authors = ["Bryan Forbes"]
license = "BSD-3-Clause"
[tool.poetry.dependencies]
python = "^3.7"
"discord.py" = {git = "https://github.com/Rapptz/discord.py.git",rev = "860d6a9ace8248dfeec18b8b159e7b757d9f56bb",extras = ["voice"]}
@bryanforbes
bryanforbes / README.md
Last active April 26, 2016 21:18
Angular2 + Typescript Demo Plunk
View README.md

Angular2 Starter Plunker - Typescript - Beta 0

A simple plunker demonstrating Angular2 usage:

  • Uses SystemJS + TypeScript to compile on the fly
  • Includes binding, directives, http, pipes, and DI usage.
@bryanforbes
bryanforbes / README.md
Created April 26, 2016 19:51
Angular2 + Typescript Demo Plunk
View README.md

Angular2 Starter Plunker - Typescript - Beta 0

A simple plunker demonstrating Angular2 usage:

  • Uses SystemJS + TypeScript to compile on the fly
  • Includes binding, directives, http, pipes, and DI usage.
View intern-promises.js
define([
'intern!object',
'intern/chai!expect',
'sinon',
'when',
'intern/chai!',
'sinon-chai'
], function (registerSuite, expect, sinon, promise, chai, sinonChai) {
// add sinon assertions to chai
chai.use(sinonChai);
View Gruntfile.coffee
"use strict"
module.exports = (grunt) ->
require("matchdep").filterAll("grunt-*").forEach grunt.loadNpmTasks
grunt.initConfig
bower:
install:
@bryanforbes
bryanforbes / Application.js
Created September 13, 2013 17:28
Store-backed widget example
View Application.js
// my/Application.js
define([
'dojo/store/JsonRest',
'./Widget',
'dojo/domReady!'
], function (JsonRest, Widget) {
return {
initialize: function () {
var store = new JsonRest({ target: '/target/' }),
ui = new Widget({