Skip to content

Instantly share code, notes, and snippets.

View alexwhin's full-sized avatar
:octocat:

Alex Whinfield alexwhin

:octocat:
  • Wales, UK
View GitHub Profile
import { diskStorage } from "multer";
import { FileInterceptor } from "@nestjs/platform-express";
import { ApiResponse, ApiConsumes, ApiBody } from "@nestjs/swagger";
import {
Res,
Get,
Post,
Param,
Controller,
@JamieMason
JamieMason / next.config.js.md
Last active August 1, 2024 14:56
Next.js chrome devtools coverage settings

Next.js chrome devtools coverage settings

I found these settings really useful when using the Chrome Devtools Coverage Inspector to look for unused JavaScript in a Next.js App.

Build the app for production with these settings and the output will be easier to debug.

// next.config.js
module.exports = {
 webpack(config) {
@hassansin
hassansin / eloquent-cheatsheet.php
Last active April 10, 2025 08:32
Laravel 5 Eloquent CheatSheet #laravel #eloquent
Model::
/*Select*/
select('col1','col2')
->select(array('col1','col2'))
->select(DB::raw('businesses.*, COUNT(reviews.id) as no_of_ratings, IFNULL(sum(reviews.score),0) as rating'))
->addSelect('col3','col4')
->distinct() // distinct select
/*From*/