Skip to content

Instantly share code, notes, and snippets.

Avatar

Paulo Köch pkoch

View GitHub Profile
View subs.json
{
"kind": "youtube#SubscriptionListResponse",
"etag": "z9iGJjS0K1-Eu7vB_kduMOCUjaU",
"nextPageToken": "CAUQAA",
"pageInfo": {
"totalResults": 166,
"resultsPerPage": 5
},
"items": [
{
View cronic
#!/bin/bash
# pkoch: I've removed the trace funcionality, unified outputs, and only send email on non-zero result.
# Cronic v3 - cron job report wrapper
# Copyright 2007-2016 Chuck Houpt. No rights reserved, whatsoever.
# Public Domain CC0: http://creativecommons.org/publicdomain/zero/1.0/
set -eu
TMP=$(mktemp -d)
OUT=$TMP/cronic.out
View game.lua
-- From https://nerdyteachers.com/Explain/Platformer/#full_code
--variables
function _init()
player={
sp=1,
x=59,
y=59,
w=8,
h=8,
View cabula.md

Listas

Criar vazia

l = []

Criar com elementos

l = [1, 'popo', [], {}]

Aceder a um index

l[0]

Contar elementos

len(l)

Adicionar um elemento

View gist:33d5e70018e70b05b79daa2dc99ee867
diff --git a/aws/structure_test.go b/aws/structure_test.go
index ab8c416a3..88a3218f8 100644
--- a/aws/structure_test.go
+++ b/aws/structure_test.go
@@ -1644,3 +1644,32 @@ func TestExpandRdsClusterScalingConfiguration_basic(t *testing.T) {
}
}
}
+
+func TestFlattenEcsContainerDefinitions_orderingIsIrrelevant(t *testing.T) {
View README.md

In dolphin, we have a place where we list the "registered tempaltes".

      @templates = (templates || [                                                
        Templates::Goodbye1::Definition,                                          
        Templates::Hello1::Definition,                                            
        Templates::Login::Definition,                                             
        Templates::OAuthContinue::Definition,                                     
        Templates::RegistrationConfirmation::Definition,                          
        Templates::VerificationSubmitted::Definition,                             
View contabilidade-covid19-16-03-2020.md

Cortesia de Álvaro Castro, da acontar.pt. Este email foi enviado para os clientes deles, e redistribuido com autorização.

Exmos. Senhores,

Devido à pandemia internacional por infecção do novo Corona Vírus, com o intuito de promover o seu combate e a protecção da saúde de todos nós, o Governo de Portugal avançou já com as seguintes medidas:

  1. Obrigações fiscais
    1. Prorrogação do prazo para entrega e pagamento do IRC de 31 de maio para 31 de julho de 2020.
    2. Prorrogação do prazo do 1º Pagamento por Conta de 31 de julho para 31 de agosto de 2020.
    3. Prorrogação do prazo do 1º Pagamento Especial por Conta de 31 de março para 30 de junho de 2020.
View gist:e406b5b635b26d293177103999fad308
pkoch@toolbox:~/github.com/pkoch/jest-mock-process$ ./node_modules/.bin/ts-node
> const w = process.stderr.write;
'use strict'
> let aa: ArgsType<typeof w>;
undefined
> .type aa
let aa: [string, string?, Function?]
>
pkoch@toolbox:~/github.com/pkoch/jest-mock-process$ git d
diff --git a/lib/__tests__/index.test.ts b/lib/__tests__/index.test.ts
View gist:28d11aacc89e179dfb333ef3bf51f6b3
pkoch@toolbox:~/github.com/pkoch/jest-mock-process$ git d
diff --git a/lib/index.ts b/lib/index.ts
index b671a4d..a15a005 100644
--- a/lib/index.ts
+++ b/lib/index.ts
@@ -4,7 +4,7 @@ export function spyOnImplementing<
T extends object,
M extends keyof T,
F extends T[M] extends (...args: any[]) => any ? T[M] : never,
->(target: T, property: M, impl: F): jest.SpyInstance {
View test.ts
import R from 'ramda'
import { mockProcessExit, mockProcessStdout, mockProcessStderr, mockConsoleLog } from 'jest-mock-process'
import { main } from './main'
describe('main', () => {
const lineize = ({result, stdout, stderr, log, exit}: {
result: any,
stdout: string[][]
stderr: string[][],