Skip to content

Instantly share code, notes, and snippets.

View junior-vs's full-sized avatar
🤪

Valdir Junior junior-vs

🤪
View GitHub Profile
@junior-vs
junior-vs / copilot-instructions.md
Created December 28, 2024 12:42
TypeScript + Angular

Development (TypeScript + Angular)

  • Use strongly typed interfaces and classes to define data models.
  • Leverage Angular's dependency injection system for better modularity and testability.
  • Organize components, services, and modules using a feature-based folder structure.
  • Apply the Reactive Forms approach for form handling when dealing with complex forms.
  • Use RxJS operators to manage asynchronous data streams effectively.
  • Prefer async/await syntax for better readability in asynchronous code.
  • Follow Angular's naming conventions for components, directives, and services.
  • Use Angular's built-in HttpClient for API communication.
@junior-vs
junior-vs / copilot-instructions.md
Last active April 3, 2025 13:17
Java - copilot-instructions

Development in JAVA

  • Use final variables wherever possible. -p
  • Favor functional programming approaches when working with Java to leverage its modern capabilities. -p
  • Include clear and meaningful comments in your code to improve readability and maintainability.
  • Maximize cohesion by encapsulating related behavior and state within the same class.
  • Use the service pattern for modular business logic.
  • Apply the repository pattern for data persistence.
  • Use the builder pattern for classes with more than seven attributes.
  • Utilize the DTO pattern (Data Transfer Object) for handling data in request and response layers.
  • Opt for Java records whenever they are suitable to simplify data representation.
@junior-vs
junior-vs / setupmachine.bat
Created January 21, 2024 14:39 — forked from shanselman/setupmachine.bat
WinGet Setup a New Machine
mkdir c:\github
winget install --id=Git.Git -e --accept-package-agreements --accept-source-agreements
winget install --id=Microsoft.VisualStudioCode -e
winget install --id=AgileBits.1Password -e
winget install --id=7zip.7zip -e
winget install --id=Twilio.Authy -e
winget install --id=Bethesda.Launcher -e
winget install --id=Microsoft.Bicep -e
winget install --id=Microsoft.bitsmanager -e
winget install --id=BrutalChess.BrutalChess -e
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
[push]
followTags = true
[core]
editor = code --wait
[alias]
c = !git add --all && git commit -m
amend = !git add --all && git commit --amend --no-edit
s = !git status -s
l = !git log --pretty=format:'%C(blue)[%h] %C(red)%d %C(white)%s - %C(cyan)%cn, %C(green)%cr'
lg = !git log --graph --decorate --all --pretty=format:'%C(auto)%h%d %s %C(black)%C(bold)%cr%Creset %C(dim white)- %an%Creset'
@junior-vs
junior-vs / git-update-fork.sh
Created January 7, 2021 13:03 — forked from rdeavila/git-update-fork.sh
Git: como atualizar um fork com as mudanças do original?
#!/bin/bash
# Adicione um novo remote; pode chamá-lo de "upstream":
git remote add upstream https://github.com/usuario/projeto.git
# Obtenha todos os branches deste novo remote,
# como o upstream/master por exemplo:
git fetch upstream
@junior-vs
junior-vs / gitflow.md
Created April 29, 2020 21:07
`git flow` commands versus `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@junior-vs
junior-vs / PruneCleanup.txt
Last active April 15, 2020 01:59
Prune/Cleanup the local references to remote branch
git branch -a
git remote prune origin --dry-run
git remote prune origin
git branch -a