apt-get updateapt-get upgrade| SELECT * FROM categories | |
| ORDER BY | |
| array_position( | |
| ARRAY[ | |
| --- ids | |
| ]::uuid[], | |
| categories.id | |
| ), | |
| name ASC; |
| Docker + Traefik + Let's Encrypt + Github Repository | |
| Using: | |
| - Ubuntu 19.04 | |
| - Docker Engine 19.03 | |
| - Docker Compose 1.25.0-rc2 | |
| - Traefik v1.7.18 with dnsChallenge | |
| - Traefik v2.0.1 with httpChallenge | |
| -- | |
| - Github Registry |
| SELECT | |
| count(*) as total, | |
| TO_CHAR(the_date_here, 'DD/MM') as create_at | |
| FROM | |
| tabela | |
| WHERE | |
| the_date_here::date > CURRENT_DATE - 7 | |
| GROUP BY create_at | |
| ORDER BY create_at ASC |
| function makeSlug(value: string, separator?: string = '_'): string { | |
| const mapAccentsHex: any = { | |
| a : /[\xE0-\xE6]/g, | |
| A : /[\xC0-\xC6]/g, | |
| e : /[\xE8-\xEB]/g, | |
| E : /[\xC8-\xCB]/g, | |
| i : /[\xEC-\xEF]/g, | |
| I : /[\xCC-\xCF]/g, | |
| o : /[\xF2-\xF6]/g, | |
| O : /[\xD2-\xD6]/g, |
| export const capturarPercentualTempoDecorridoPasso = (data_inicial: Date | null, data_final: Date | null, tempo_padrao: number): number => { | |
| if (!data_inicial) { | |
| return 0 | |
| } | |
| const hs3 = 10800 | |
| const segundosTotal = tempo_padrao * 60 * 60 | |
| const inicio = moment(data_inicial).unix() - hs3 | |
| const fim = moment(data_final).unix() - hs3 |
| curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
| echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee | |
| /etc/apt/sources.list.d/yarn.list | |
| sudo apt update && sudo apt install yarn |