Skip to content

Instantly share code, notes, and snippets.

@bruno-de-queiroz
bruno-de-queiroz / app.controller.ts
Created June 28, 2023 09:15
nestjs/swagger 7.0.10 default values bug
import { Controller, Get, Query } from '@nestjs/common';
import { PageDto } from './page.dto';
@Controller()
export class AppController {
@Get()
test(@Query() page: PageDto) {
return { value: `${page.sort}` };
}
}
@bruno-de-queiroz
bruno-de-queiroz / core.sh
Last active January 30, 2018 13:58
Autocomplete example and annotation parser for bash scripts to make easier to expose functions and flags, to create help info and short command list for autocompletion script
#!/bin/bash
#
# Autocomplete example and annotation parser for bash scripts to make easier to expose functions and flags,
# to create help info and short command list for autocompletion script
#
# Usage:
#
# source $SCRIPT_PATH/core.sh
# ...
# #@flag -e|--environment
@bruno-de-queiroz
bruno-de-queiroz / TicTacToe.markdown
Created September 3, 2014 01:15
A Pen by Bruno de Queiroz.
game{ background:lightgrey; border:1px solid #CCC; height:400px; width:400px; position:relative; display:block;}
scene { display:block; position:relative; height:100%; min-width:100%;}
pipe { position:absolute; display:inline-block; background:green}
bird { position:absolute; bottom:0; transition: all 1s ease-in; height:10%; width:10%; background:black; border-radius:20px; }
bird:before { content:''; width:50%; height:50%; border-radius:10px; display:inline-block; background:green; position:absolute; left:0; top:50%; margin-top:-25%;}
bird:after { content:''; width:50%; height:50%; border-radius:10px; display:inline-block; background:green; position:absolute; right:-25%; top:50%; margin-top:-25%;}
bird.top { transition:all .3s ease-in-out; }
bird.initial { bottom:50%; margin-bottom:-5px; }
#container { background:lightgrey; border:1px solid #CCC; height:400px; width:400px; position:relative}
#box { position:absolute; bottom:0; transition: all 1s ease-in; height:10%; width:10%; background:black; border-radius:20px; }
#box:before { content:''; width:50%; height:50%; border-radius:10px; display:inline-block; background:green; position:absolute; left:0; top:50%; margin-top:-25%;}
#box:after { content:''; width:50%; height:50%; border-radius:10px; display:inline-block; background:green; position:absolute; right:-25%; top:50%; margin-top:-25%;}
#box.top { transition:all .3s ease-in-out; }
#box.initial { bottom:50%; margin-bottom:-5px }