This file contains hidden or 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
| # 🎯 Basic Navigation | |
| ``` | |
| // Which database am I using? | |
| db | |
| // List all databases | |
| show dbs | |
| // Switch database |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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:
NewerOlder