Skip to content

Instantly share code, notes, and snippets.

View brianpooe's full-sized avatar
😎
Working from home

Brian Pooe brianpooe

😎
Working from home
View GitHub Profile
# Parts of this config were created by Derek Taylor, AKA DistroTube. The rest was created by Matt Weber aka The Linux Cast
font:
size: 12
offset:
y: 1
normal:
family: "JetBrainsMono Nerd Font Mono"
window:
padding:
const xlsx = require('xlsx');
const filePath = process.argv.slice(2)[0];
const workbook = xlsx.readFile(filePath);
const worksheet = workbook.Sheets[workbook.SheetNames[0]];
let posts = [];
let post = {};
for (let cell in worksheet) {
@brianpooe
brianpooe / fileUpload.ts
Created September 14, 2019 11:20
NestJS upload file to AWS s3 bucket with multer
import { Req, Res, Injectable } from '@nestjs/common';
import { Profile } from './profile.entity';
import { Repository } from 'typeorm';
import { InjectRepository } from '@nestjs/typeorm';
import { ProfileDto } from './dto/profile.dto';
import { User } from 'users/user.entity';
import { UserQuery, ProfileQuery } from './structures/helpers';
import * as multer from 'multer';
import * as AWS from 'aws-sdk';
import * as multerS3 from 'multer-s3';