This file contains hidden or 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
| // MIT License | |
| // | |
| // Copyright (c) 2019 Simon Lightfoot | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| // copies of the Software, and to permit persons to whom the Software is | |
| // furnished to do so, subject to the following conditions: |
This file contains hidden or 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 NVM_DIR="$HOME/.nvm" | |
| [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
| [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
| export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64" | |
| export PYTHON_BUILD_ARIA2_OPTS="-x 10 -k 1M" | |
| export PYENV_ROOT="$HOME/.pyenv" | |
| export PATH="$PYENV_ROOT/bin:$PATH" | |
| export PATH="$HOME/.rbenv/bin:$PATH" | |
| export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH" | |
| export PATH="$JAVA_HOME/bin:$PATH" |
This file contains hidden or 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 axios = require("axios"); | |
| const fs = require("fs"); | |
| async function getData() { | |
| const data = await axios | |
| .get("https://servicodados.ibge.gov.br/api/v1/localidades/estados") | |
| .then(res => res.data); | |
| const final = await Promise.all( | |
| data.map(async ({ id, sigla, nome }) => { |
This file contains hidden or 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 axios = require("axios"); | |
| const fs = require("fs"); | |
| async function getData() { | |
| const data = await axios | |
| .get("https://servicodados.ibge.gov.br/api/v1/localidades/estados") | |
| .then(res => res.data); | |
| const final = await Promise.all( | |
| data.map(async ({ id, sigla, nome }) => { |
This file contains hidden or 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 | |
| regexDominio = '^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$'; | |
| regexIP = '\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\' + | |
| '.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.' + | |
| '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.' + | |
| '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b'; | |
| regexEmail = '^((?>[a-zA-Z\d!#$%&''*+\-/=?^_`{|}~]+\x20*' + | |
| '|"((?=[\x01-\x7f])[^"\\]|\\[\x01-\x7f])*"\' + |