This file contains 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 { defineStore, getActivePinia } from "pinia"; | |
const activePinia = getActivePinia(); | |
if (!activePinia) return; | |
Object.entries(activePinia.state.value).forEach(([storeName, state]) => { | |
console.debug("Resetting store", storeName); | |
const storeDefinition = defineStore(storeName, state); | |
const store = storeDefinition(activePinia); |
This file contains 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
<?php | |
namespace App\Constants; | |
/** | |
* Classe com todos os UFs de cada estado do Brasil | |
*/ | |
class UfStatesBrazil | |
{ | |
public const ACRE = 'AC'; |
This file contains 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
OFXHEADER:100 | |
DATA:OFXSGML | |
VERSION:102 | |
SECURITY:NONE | |
ENCODING:USASCII | |
CHARSET:1252 | |
COMPRESSION:NONE | |
OLDFILEUID:NONE | |
NEWFILEUID:NONE |
This file contains 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
public class CanvasUtils | |
{ | |
private bool HasClickedOnCanvasElement() | |
{ | |
PointerEventData pointerData = new PointerEventData(EventSystem.current); | |
List<RaycastResult> results = new List<RaycastResult>(); | |
pointerData.position = Input.mousePosition; | |
Raycaster.Raycast(pointerData, results); |
This file contains 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
$originalString = "Hello world" | |
$firstIndex = $originalString.IndexOf('H') | |
$lastIndex = $originalString.IndexOf('o') | |
$startIndex = $firstIndex + 1 | |
$length = ($lastIndex - $firstIndex) - 1; | |
$finalString = $originalString.Substring($startIndex, $length) |
This file contains 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
# Credits: https://stackoverflow.com/a/49515414/12542704 | |
$header = @("commit", "tree", "parent", "refs", "subject", "body", "author", "commiter") | |
[string] $gitLogs = (git --no-pager log -n 10 --no-merges --pretty=format:'%H|%T|%P|%D|%s|%b|%an|%cn;') | |
$replacedArray = $gitLogs.Replace("; ", ';') -split ";", 0, "multiline"; | |
$handledLogs = foreach ($commit in $replacedArray) { | |
$prop = $commit -split "\|" | |
$hash = [ordered]@{} |
This file contains 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
/** | |
* Class with some utilities to work on a canvas context | |
* @author Fabrício Pinto Ferreira | |
*/ | |
export class CanvasUtility { | |
/** | |
* @param {CanvasRenderingContext2D} newContext | |
*/ | |
constructor(newCanvasContext) { | |
/** @type {CanvasRenderingContext2D} */ |
This file contains 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
{ | |
"sdk": { | |
"version": "3.1.0", | |
"rollForward": "latestFeature" | |
} | |
} |
This file contains 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
# Auto detect text files and perform LF normalization | |
* text=auto | |
*.cs linguist-language=csharp | |
*.csproj linguist-language=csharp | |
*.sln linguist-language=csharp | |
*.md linguist-detectable=true | |
*.md linguist-documentation=false | |
# And ignore those repositories considering them as documentation |
This file contains 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
#region Variables | |
<# Set the MongoDB access variables #> | |
$databaseName = "databaseName" | |
# $username = "" | |
# $password = "" | |
# $authenticationDatabase = "" | |
$mongoDbHost = "localhost:27017" | |
# $uri = "" |