This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { JSDOM } = require('jsdom'); | |
const { writeFileSync } = require('node:fs'); | |
let csvContent = 'Código;Data do pagamento;Rendimento;Total\n'; | |
let errorContent = ''; | |
/** | |
* Fetch data from a URL and extract the value using XPath | |
* @param {*} param0 | |
* @returns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to run: | |
# .\Pack-Projects.ps1 -solutionPath "D:\Projects\AppFramework" -version "2.0.0" | |
# .\Pack-Projects.ps1 -solutionPath "D:\Projects\AppFramework" -version "2.0.0" -outputPath "D:\NuGetPackagesLocal" -targetProjectPath "D:\Projects\Template\server" | |
param( | |
[Parameter(Mandatory=$true)] | |
[string]$solutionPath, | |
[Parameter(Mandatory=$true)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq.Expressions; | |
using System.Reflection; | |
namespace Infrastructure.Extensions; | |
public static class DynamicSearchExtensions | |
{ | |
public static IQueryable<T> DynamicSearch<T>(this IQueryable<T> query, string? searchTerm) | |
{ | |
if (string.IsNullOrWhiteSpace(searchTerm)) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Start a transaction | |
BEGIN TRANSACTION; | |
-- Select the initial count of employees | |
DECLARE @initialCount INT; | |
SELECT @initialCount = COUNT(*) FROM employees WHERE salary < 50000; -- Select that matches the update clasure | |
---------------------------------------------- Perform an update operation ---------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --rm --link sonarqube \ | |
-e SONAR_HOST_URL=$SONAR_HOST_URL \ | |
-e SONAR_TOKEN=$SONAR_TOKEN \ | |
-v "$PROJECT_PATH:/usr/src" \ | |
sonarsource/sonar-scanner-cli \ | |
-Dsonar.projectKey=$SONAR_PROJECT_KEY \ | |
-Dsonar.projectName="$SONAR_PROJECT_NAME" \ | |
-Dsonar.projectVersion=$SONAR_PROJECT_VERSION \ | |
-Dsonar.sources=$SONAR_SOURCES \ | |
-Dsonar.sourceEncoding=$SONAR_SOURCE_ENCODING \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async fetchImageBlob(url: string) { | |
const response = await fetch(url); | |
if (!response.ok) throw new Error('Failed to fetch image'); | |
return response.blob(); | |
} | |
// Helper function to convert blob to Base64 | |
async convertBlobToBase64(blob: Blob) { | |
return new Promise((resolve, reject) => { | |
const reader = new FileReader(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################################### | |
########## Terminal configuration ########## | |
########################################### | |
# Path to your oh-my-zsh installation. | |
export ZSH="$HOME/.oh-my-zsh" | |
export PATH="$PATH:$HOME/.gem/ruby/2.6.0/bin" | |
# Check if powerlevel10k is cloned and clone it if not |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Deploy no Heroku | |
# verificar se o heroku esta instalado | |
heroku --version | |
# Fazer login no Heroku | |
heroku login | |
# Entrar na pasta com dockerfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module posh-git | |
oh-my-posh --init --shell pwsh --config ~/oh-my-posh.omp.json | Invoke-Expression | |
Import-Module -Name Terminal-Icons | |
Import-Module PSReadLine | |
Set-PSReadLineOption -EditMode Windows | |
Set-PSReadLineOption -PredictionSource History | |
# F2 switches between ListView and LineView | |
Set-PSReadLineOption -PredictionViewStyle ListView |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "es6", | |
"module": "commonjs", | |
"allowJs": true, | |
"outDir": "dist", | |
"rootDir": "src", | |
"baseUrl": "src", | |
"paths": { | |
"@config/*": ["config/*"], |
NewerOlder