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
package main | |
import ( | |
"fmt" | |
"log" | |
"os/exec" | |
"regexp" | |
"github.com/gocolly/colly/v2" | |
) |
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
{ | |
nome: itens[0].receita.nome, | |
... | |
ingredientes: //aquele map vai aqui | |
... | |
} as ReceitaCompleta |
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
items.map((item) => { | |
return { | |
nome: item.nome, | |
quantidade: item.quantidade, | |
unidade: item.unidade | |
} as Ingrediente | |
}); |
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
senior é quem tem cicatriz | |
Experiência | |
- estudos | |
- Orientação a Objetos | |
- Padrões | |
- Design Patterns | |
- Padrões de arquitetura de aplicações | |
- Design de código |
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
#include <iostream> | |
#include <vector> | |
#include <string> | |
using namespace std; | |
void foo(string meu_array[], int size) | |
{ | |
for(int i = 0; i < size; i++){ | |
cout << " " << meu_array[i]; |
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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/vquaiato/.oh-my-zsh" | |
# Set name of the theme to load. Optionally, if you set this to "random" | |
# it'll load a random theme each time that oh-my-zsh is loaded. | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
ZSH_THEME="robbyrussell" |
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
#!/usr/bin/env bash | |
cat cards.txt | while read card; do | |
clean=$(echo $card | sed 's/ /+/g' | sed "s/[',]//g") | |
url=$(echo "https://api.scryfall.com/cards/named\?exact\=${clean}") | |
echo "${card};$(curl -s "{$url}" | jq -r '.usd' | sed 's/\./,/g')" | |
done |
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
brew install jq | |
curl -s https://api.scryfall.com/cards/search\?q\=t%3Aplaneswalker | jq -r '.data[].name' |
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 static IApplicationBuilder Use401ForUnauthorizedApiCalls(this IApplicationBuilder app) | |
{ | |
app.Use(async (context, next) => | |
{ | |
if (context.Request.Path.Value.Contains("/api") && | |
(context.User == null || | |
context.User.Identity == null || | |
!context.User.Identity.IsAuthenticated)) | |
{ | |
context.Response.StatusCode = 401; |
NewerOlder