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 DOCKER_DEFAULT_MACHINE_NAME=default | |
#check if docker-machine is Stopped | |
export DOCKER_MACHINE_STATUS="$(docker-machine status $DOCKER_DEFAULT_MACHINE_NAME)" | |
if [ $DOCKER_MACHINE_STATUS = "Stopped" ]; then | |
echo "Starting docker-machine..." | |
docker-machine start $DOCKER_DEFAULT_MACHINE_NAME | |
fi |
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 printablePromise = text => | |
new Promise(resolve => { | |
console.log(text) | |
return resolve() | |
}) | |
const actionA = () => printablePromise('A') | |
const actionB = () => printablePromise('B') | |
const actionC = () => printablePromise('C') | |
const actionD = () => printablePromise('D') |
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 { GraphQLString, | |
GraphQLObjectType } = require(‘graphql’ | |
) | |
const MyCustomType = new GraphQLObjectType({ | |
name: ‘MyCustomType’, | |
description: ‘My custom type’, | |
fields: () => ({ | |
myStringField: { | |
type: GraphQLString, | |
description: ‘A string field’ |
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 { expect } = require(‘chai’) | |
const MyCustomType = require(‘./MyCustomType’) | |
describe(‘MyCustomType test’, () => { | |
it(‘checks aCustomResolvedField #resolve’, () => { | |
const testObject = { | |
myStringField: 'hello', | |
innerValues: { | |
innerField: 'world' | |
} | |
} |
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
# put here your main branch | |
MAIN_BRANCH=master | |
# command to list the files that you changed in your current branch and already commit to that branch | |
git --no-pager diff --name-only $MAIN_BRANCH | |
# and command to list the files that you changing right now | |
git status -s | awk '{if ($1 == "M" || $1 == "??") print $2}' | |
# execute both commands, concatenate the results and remove the duplicates |
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
class Coiso | |
def ligar_com(treco) | |
# ... | |
Coisa.new | |
end | |
# ... | |
end | |
class Treco | |
# ... |
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
class Coiso | |
# ... | |
end | |
class Rota | |
# ... | |
end | |
class GPS | |
def calcular_rota(coiso) |
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
class Endereco | |
# ... | |
end | |
class Rota | |
# ... | |
end | |
class GPS | |
def calcular_rota(endereco) |
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/sh | |
for code_directory in $(ls -d */) | |
do | |
# go to directory | |
cd $code_directory | |
code_directory_default_branch=$(git rev-parse --abbrev-ref origin/HEAD | sed 's@^origin/@@') | |
code_directory_current_branch=$(git rev-parse --abbrev-ref HEAD | sed 's@^origin/@@') |
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
# Installing Tracetest and Signoz on a Kubernetes cluster | |
k3d cluster create tracetest-signoz | |
cat << EOF > opentelemetry-collector-resources.yaml | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: collector-config | |
data: |
OlderNewer