Skip to content

Instantly share code, notes, and snippets.

{
"name": "Debug Tests JS",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/.bin/jest",
"cwd": "${workspaceRoot}",
"args": ["--projects", "./tests/", "--runInBand"],
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
},
/** gerais **/
// Request
// curl -X GET --url http://192.168.0.21:3000/
// curl -X -I --url http://192.168.0.21:80/ -> SEND A HEAD REQUEST TO GET INFO ABOUT WHAT IS RUNNING ON PORT X
/** Nmap
https://nmap.org/book/
*/
// nmap -sn -n 192.168.0.1/24 | grep 192 | cut -d ' ' -f 5 > ips.txt
sudo docker network create kibana-network
sudo docker run -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" --name elasticsearch --net kibana-network elasticsearch:7.6.2
sudo docker run -d --name kibana --net kibana-network -p 5601:5601 kibana:7.6.2
@albovieira
albovieira / exemplo.js
Last active February 11, 2020 16:02
exemplo.js
function createMongoDB() {
return DatabaseFactory.create({
type: 'mongodb',
database: 'test-package',
url: 'mongodb://localhost:27017',
options: {
reconnectInterval: 1000,
useNewUrlParser: true
}
});
@albovieira
albovieira / setup.sh
Last active May 24, 2022 15:44
Initial setup for linux
# Instal:
# - Chome
# - Terminal terminator
# - git
# - zsh terminal
# - ohmyzsh framework
# - high light terminal
# - visual code
# - docker + docker-compose
@albovieira
albovieira / tree.ts
Created December 8, 2019 03:23
tree in ts
import { Func } from 'mocha';
//Ref: https://code.tutsplus.com/articles/data-structures-with-javascript-tree--cms-23393
class NodeTree {
readonly name: string;
readonly value: any;
private parent: string | null;
private children: NodeTree[];
@albovieira
albovieira / start hooks max
Created June 5, 2019 17:16
start hooks max
git flow init -fd && git submodule init && git submodule update && ./hooks/deploy-git-hooks.sh
sudo nmcli connection import type openvpn file /home/albo-vieira/Downloads/client.ovpn
sudo openvpn --config ~/Downloads/client.ovpn
This file has been truncated, but you can view the full file.
{
"-LLakloTgTIcJE4Zqody": {
"data": {
"code": "4000",
"message": "User not found",
"type": "ResourceNotFoundException"
},
"provider": "maxmilhas",
"status": 404,
"user": "felipearimm"
const CLOUD_MESSAGER = {
android: {
messager: 'GCM',
arn: process.env.AWS_SNS_ANDROID_ARN
},
ios: {
messager: 'APNS',
arn: process.env.AWS_SNS_IOS_ARN
}
};