Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<template> | |
<slot :env="env" /> | |
</template> | |
<script setup lang="ts"> | |
const env = computed(() => | |
Object.entries(import.meta.env).reduce( | |
(acc, [key, value]) => ({ | |
...acc, | |
[key]: value, |
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 Startup | |
{ | |
public IServiceProvider ConfigureServices(IServiceCollection services) | |
{ | |
services.AddMvc().AddJsonOptions(options => | |
{ | |
options.SerializerSettings.Converters.Add(new Newtonsoft.Json.Converters.StringEnumConverter()); | |
options.SerializerSettings.NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore; | |
}); | |
} |
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 | |
/** | |
* Classe Bhaskara, onde calculamos | |
* o conjunto solucão de uma equacão | |
* dados os valores dos coeficientes | |
* a, b e c. | |
* | |
* @author Samuel Simão | |
* | |
*/ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Service-worker demo</title> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<script> | |
if ( "serviceWorker" in navigator ) { |
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
Shader "PostProcess/HeightFog" | |
{ | |
Properties | |
{ | |
[HideInInspector] _MainTex ("Texture", 2D) = "white" {} | |
_FogColor ("FogColor", Color) = (1,1,1,1) | |
_FogDensity ("FogDensity", Range(0,1)) = 0.2 | |
_FogHeight ("FogHeight", float) = 5.0 | |
} | |
SubShader |
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
# Set the Google Auth parameters. Fill in your RefreshToken, ClientID, and ClientSecret | |
$params = @{ | |
Uri = 'https://accounts.google.com/o/oauth2/token' | |
Body = @( | |
"refresh_token=$RefreshToken", # Replace $RefreshToken with your refresh token | |
"client_id=$ClientID", # Replace $ClientID with your client ID | |
"client_secret=$ClientSecret", # Replace $ClientSecret with your client secret | |
"grant_type=refresh_token" | |
) -join '&' | |
Method = 'Post' |
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 | |
function validar_cnpj($cnpj) | |
{ | |
$cnpj = preg_replace('/[^0-9]/', '', (string) $cnpj); | |
// Valida tamanho | |
if (strlen($cnpj) != 14) | |
return false; |
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
Possible values for ext-name: | |
bcmath | |
bz2 | |
calendar | |
ctype | |
curl | |
dba | |
dom | |
enchant |
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
#!/bin/bash | |
# Get the current branch name | |
current_branch=`git rev-parse --abbrev-ref HEAD` | |
# Search Jira ID in a pattern such a "feature/ABCD-123-my-feature" | |
id=$(echo $current_branch | sed -nE 's,[a-z]+/([A-Z]+-[0-9]+)-.+,\1,p') | |
# only prepare commit message if pattern matched and jiraId was found | |
if [[ ! -z $id ]]; then |
OlderNewer