Skip to content

Instantly share code, notes, and snippets.

View brenc's full-sized avatar
🏠
Working from home

Brendon C. brenc

🏠
Working from home
  • USA
View GitHub Profile
import {
NestInterceptor,
ExecutionContext,
Injectable,
CallHandler,
} from '@nestjs/common';
import { classToPlain } from 'class-transformer';
import { map } from 'rxjs/operators';
@Injectable()
@HighMacGuy
HighMacGuy / first_run.ini
Last active August 18, 2022 16:52 — forked from andyspicer/install.sh
OpenVPN Access Server Letsencrypt
# OpenVPN Let's Encrypt first run config file
#https://loige.co/using-lets-encrypt-and-certbot-to-automate-the-creation-of-certificates-for-openvpn/
cert-name=
authenticator = standalone
standalone-supported-challenges = tls-sni-01
non-interactive = True
rsa-key-size = 4096
email = "user@server.com"
domains = "vpn.server.com"
@vlucas
vlucas / encryption.js
Last active May 8, 2024 06:55
Stronger Encryption and Decryption in Node.js
'use strict';
const crypto = require('crypto');
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bits (32 characters)
const IV_LENGTH = 16; // For AES, this is always 16
function encrypt(text) {
let iv = crypto.randomBytes(IV_LENGTH);
let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(ENCRYPTION_KEY), iv);
@gmetais
gmetais / gzip-conf.txt
Last active February 28, 2021 14:06
This is a list of Content-Type / mime-type for a server Gzip/Brotli compression configuration
This list was moved to https://letstalkaboutwebperf.com/en/gzip-brotli-server-config/
@kimus
kimus / ufw.md
Created March 2, 2014 22:46
NAT and FORWARD with Ubuntu’s ufw firewall

UFW

I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.

Install UFW

if ufw is not installed by default be sure to install it first.