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:
@brianpooe
brianpooe / readme.md
Created December 8, 2020 19:29 — forked from jimmywarting/readme.md
Cors proxies
Exposed headers
Service SSL status Response Type Allowed methods Allowed headers
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 / paginator.ts
Created November 8, 2020 10:35
Pagination response body
export interface IPaginationOptions {
/**
* the amount of items to be requested per page
*/
limit: number;
/**
* the page that is requested
*/
page: number;
/**
@brianpooe
brianpooe / Invalid Host Header NGROK
Created September 12, 2020 15:15 — forked from xola139/Invalid Host Header NGROK
When Invalid Host Header when ngrok tries to connect to Angular or React dev server
When Invalid Host Header when ngrok tries to connect to Angular or React dev server use this form for run ngrok.
ngrok http 8080 -host-header="localhost:8080"
ngrok http --host-header=rewrite 8080
@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';