This requires your project to be configured with `–enable-coverage`. This way it compiles in a way to be instrumented.
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
#!/bin/env bash | |
set -eu | |
ip -br a s eth0 | awk '{ split($3,a,"/"); print a[1]; }' |
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
. | |
├── BUILD | |
│ ├── test-0.0.1 | |
│ │ └── test.sh | |
│ └── test.sh | |
├── BUILDROOT | |
├── RPMS | |
│ └── x86_64 | |
│ └── test-0.0.1-1.el8.x86_64.rpm | |
├── SOURCES |
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
// `isAuth`, `validateBody` e `addCredit` podem term cada um um tipo de erro diferente. | |
// temos 2 maneiras: classificar os erros no mesmo dominio (mais comum) | |
// ou, precisa de um objeto de unificação (existem outras tecnicas mais exóticas). | |
// Modo mais comum. | |
class CreateAccountErrors {} | |
class NotAuthError extends CreateAccountErrors {} | |
class ValidateCreateAccountError extends CreateAccountErrors {} | |
class AddCreditError extends CreateAccountErrors {} |
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
{ nixpkgs ? import <nixpkgs> {} }: | |
let | |
inherit (nixpkgs) pkgs; | |
erlang = nixpkgs.beam.interpreters.erlangR25.override { | |
configureFlags = ["--disable-jit"]; | |
}; | |
beamPackages = nixpkgs.beam.packagesWith erlang; | |
in pkgs.mkShell { | |
nativeBuildInputs = with pkgs; [erlang elixir]; | |
} |
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
const { taggedSum } = require('daggy'); | |
const AuthenticationError = taggedSum( | |
'AuthenticationError', | |
{ | |
AccountSuspended: [], | |
InformationMismatch: [], | |
} | |
); |
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 default function BaseComponent(apicall) { | |
return (props): React.FC => { // <<- this is the real renderable component | |
const { /* ... */ } = useUser(apicall); | |
return /* ... */ | |
}; | |
} |
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 MVD where | |
data Kind = Div | A | |
deriving (Eq, Show) | |
data Opts = ClassName String | |
deriving (Eq, Show) | |
data HTML = HTML Kind Opts | |
| HText 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
633 comby -matcher .rb ':[[h]].each do |:[[j]]|:[[i]]end' '' | |
635 comby -matcher .rb ':[h].each do |:[j]|:[i]end' '' | |
636 comby -matcher .rb ':[h].each do |:[j]|:[[i]]end' '' | |
637 comby -matcher .rb ':[[h]].each do |:[[j]]|:[[i]]end' '' | |
638 comby ':[[h]].each do |:[[j]]|:[[i]]end' '' -matcher -rb | |
639 comby ':[[h]].each do |:[[j]]|:[[i]]end' '' -matcher .rb | |
640 comby ':[[h]].each do |:[[j]]|:[[i]]end' '' | |
641 comby ':[[h]].each do |:[[j]]|:[[i]]end' '' --matcher .rb | |
642 comby ':[[h]].each do |:[[j]]|:[[i]]end' '' -matcher .rb | |
643 comby ':[[h]].each do |:[[j]]|' '' -matcher .rb |
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
// Derivação de `map` com `reduce`. | |
> f = item => item + 2; | |
[Function: f] | |
> [1, 2, 3, 4].reduce((acc, item) => { acc.push(f(item)); return acc; }, []); | |
[ 3, 4, 5, 6 ] | |
> [1, 2, 3, 4].map(f); | |
[ 3, 4, 5, 6 ] | |
// Reduzindo com outros acumuladores. |
NewerOlder