Skip to content

Instantly share code, notes, and snippets.

View banzeh's full-sized avatar
👨‍💻
Working

Flavio Takeuchi banzeh

👨‍💻
Working
View GitHub Profile
@banzeh
banzeh / function.js
Created November 9, 2018 20:43
HTTP Post on MongoDB Stitch - IFTTT Example
exports = async function(args){
console.log({args: args});
const api_url = "https://maker.ifttt.com";
const request_path = "/trigger/{webhook_event}/with/key/{your_ifttt_private_key}";
const ifttt = context.services.get("your-service-name");
const response = await ifttt.post({
url: api_url + request_path,
encodeBodyAsJSON: true,
body: {
@banzeh
banzeh / monokai-for-windows-terminal-profiles.json
Last active February 13, 2024 10:31
Monokai Theme for Windows Terminal
{
"globals" :
{
"alwaysShowTabs" : true,
"defaultProfile" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"initialCols" : 120,
"initialRows" : 30,
"keybindings" :
[
{
@banzeh
banzeh / gist:775303d7b91e1ac6e4bf18f8791d7079
Created April 30, 2020 12:03
Função em TS com Regex para validar JSON
public validateJSON(text: string): boolean {
return !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(
text.replace(/"(\\.|[^"\\])*"/g, ''))) &&
eval('(' + text + ')');
}
00020126540014br.gov.bcb.pix0132pix_marketplace@mercadolibre.com52040000530398654072299.005802BR59091P CE_MLB6007Cajamar62240520mpqrinter147347763636304EB89
@banzeh
banzeh / eleicao2022.ps1
Last active October 2, 2022 22:43
Resultado da eleição Powershell
$url = 'https://resultados.tse.jus.br/oficial/ele2022/544/dados-simplificados/br/br-c0001-e000544-r.json'
$result = (Invoke-WebRequest -Method GET $url).Content | ConvertFrom-Json | Select-Object -Expand cand
$result | Select seq, @{l='Candidato';e='nm'}, @{l='Votos válidos';e='vap'}, @{l='%';e='pvap'}