Skip to content

Instantly share code, notes, and snippets.

View ibayazit's full-sized avatar
🎯
Focusing

İbrahim Bayazit ibayazit

🎯
Focusing
View GitHub Profile
@ibayazit
ibayazit / serialize.interceptor.ts
Created April 13, 2023 08:58
NestJS format outgoing response
import {
UseInterceptors,
NestInterceptor,
ExecutionContext,
CallHandler
} from "@nestjs/common";
import { Observable } from "rxjs";
import { map } from "rxjs";
import { plainToInstance } from "class-transformer";
@ibayazit
ibayazit / main.js
Created November 10, 2023 10:36
Sample DI
const UserTypes = Object.freeze({
DEFAULT: "DEFAULT",
MANAGER: "MANAGER",
ADMIN: "ADMIN",
});
class DefaultService {
run() {
console.log(DefaultService.name);
}
@ibayazit
ibayazit / Dockerfile
Last active March 10, 2024 13:25
Laravel 5.7 dockerize
FROM php:7.4.0-cli
WORKDIR /var/www/html
RUN apt-get update && apt-get install -y \
git \
zip \
unzip \
libmcrypt-dev \
libonig-dev \