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
jest.mock('statsig-node', () => ({ | |
default: { | |
initialize: jest.fn(), | |
checkGate: jest.fn(), | |
}, | |
})); | |
// ... | |
Statsig.checkGate.mockResolvedValue(true); |
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
export const removeAccents = (str): string => | |
str.normalize('NFD').replace(/\p{Mn}/gu, ''); | |
export function sanitize(text?: string | undefined): string { | |
if (!text) return ''; | |
return removeAccents(text.toLocaleLowerCase()).split(' ').join('-'); | |
} | |
export function parameterize(text?: string | undefined): string { |
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 React from 'react'; | |
import { Box } from '@mui/material'; | |
type ImgProps = { | |
alt?: string; | |
src: string; | |
width: number; | |
height?: number; | |
}; |
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
with boletos as | |
( | |
select | |
to_char (ii .created_at , 'YYYY-MM' ) as mes , | |
--sum(ii .amount ) as valor_total_invoices , | |
--count(ii .id ) as quantidade_invoices , | |
sum (ii .amount ) filter (where bb.created_at is not null) as valor_total_boletos , | |
count(distinct i .account_id ) filter (where bb.created_at is not null) as total_clientes_com_boletos , | |
count(bb .id ) filter (where bb .created_at is not null) as quantidade_boletos_emitidos , | |
count(bb .id ) filter ( where bb.paid_at is not null) as quantidade_boletos_liquidados , |
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
-- {"1": [{"id": 1,"name": "Max"},{"id": 11,"name": "Perez"}],"2": [{"id": 2,"name": "Leclerc"},{"id": 3,"name": "Sainz"}]} | |
select | |
j.* | |
from test, | |
jsonb_each(metadata) as j | |
select | |
jsonb_each(metadata) |
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
module test-dojo | |
go 1.16 |
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
// A data structure to hold key/value pairs | |
type Pair struct { | |
Key string | |
Value float64 | |
} | |
// A slice of pairs that implements sort.Interface to sort by values | |
type PairList []Pair |
==> postgresql@12 This formula has created a default database cluster with: initdb --locale=C -E UTF-8 /usr/local/var/postgresql@12 For more details, read: https://www.postgresql.org/docs/12/app-initdb.html
postgresql@12 is keg-only, which means it was not symlinked into /usr/local, because this is an alternate version of another formula.
If you need to have postgresql@12 first in your PATH, run:
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" | |
"time" | |
) | |
func main() { | |
t := time.Now().UTC() | |
fmt.Println("UTC") |
NewerOlder