Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
/* | |
* @return Retorna a cotação atual de um título específico do Tesouro Direto. | |
* Fonte: https://www.tesourodireto.com.br/titulos/precos-e-taxas.htm | |
**/ | |
function TESOURODIRETO(bondName, argumento="r") { | |
let srcURL = "https://www.tesourodireto.com.br/json/br/com/b3/tesourodireto/service/api/treasurybondsinfo.json"; | |
let jsondata = UrlFetchApp.fetch(srcURL); | |
let parsedData = JSON.parse(jsondata.getContentText()).response; | |
for(let bond of parsedData.TrsrBdTradgList) { |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/usr/bin/bash | |
if [[ ! -d $1 ]] || [[ ! -d $2 ]] | |
then | |
echo "\nUsage: $0 dirname_for_adding_guard source_root_dirname\n" | |
echo "Example: $0 src/mongo/db src" | |
echo -n "Will find '#pragma once' and add MONGO_DB_FOO_H in foo.h if the guard of foo.h is not there. " | |
echo "If the guard is already there, then skip.\n" | |
echo "Be careful with the dirname passed to this script, args1 must be a subdir of args2. If the condition is not met, the script will exit immediately. \n" | |
exit 1 |