mkdir dumb-project && cd dumb-project
npm init -y
yarn add faunadb
docker run -p 8443:8443 fauna/faunadb
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
FROM node:lts | |
WORKDIR /app | |
RUN echo "const express = require('express')" > index.js | |
RUN echo "const app = express()" >> index.js | |
RUN echo "app.get('/', function (req, res) {" >> index.js | |
RUN echo "res.send('Hello World')" >> index.js | |
RUN echo "})" >> index.js | |
RUN echo "app.listen(3000)" >> index.js |
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
def subject = "job name" | |
Jenkins.instance.getAllItems(Job.class).each { job -> | |
if (job.toString().contains(subject)) { | |
println " > " + job.name | |
job.builds.each { build -> | |
println ' >> ' + build.number + ' > ' + build.result + ' > ' + build.getDescription() | |
// | |
//if (build.number < 100) build.delete() | |
//if (Result.SUCCESS != build.result) build.delete() |
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/bash | |
TICKERS=('alzr11' 'vrta11' 'knri11') | |
for t in "${TICKERS[@]}" | |
do | |
echo -n "$t " | |
curl --silent https://statusinvest.com.br/fundos-imobiliarios/$t | \ | |
grep '^<strong class="fw-700">' | sed 's/<strong class="fw-700">//g' | sed 's/<\/strong>//g' | |
done |
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
// eg: go run proxy.go -url http://localhost:8443 | |
package main | |
import ( | |
"fmt" | |
"log" | |
"flag" | |
//"bytes" | |
//"io/ioutil" | |
"net/http" |
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
using System; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
using FaunaDB.Client; | |
using FaunaDB.Types; | |
using FaunaDB.Query; | |
using static FaunaDB.Query.Language; | |
namespace FaunaTest | |
{ |
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.sbt | |
scalaVersion := "2.11.8" | |
libraryDependencies ++= Seq("com.faunadb" %% "faunadb-scala" % "2.8.1") | |
*/ | |
import com.fasterxml.jackson.databind.{ObjectMapper, SerializationFeature} | |
import faunadb.{query => q} | |
object FQLToJson extends App { |
source: https://cloud.google.com/compute/docs/instances/enable-nested-virtualization-vm-instances
$ gcloud compute disks create ubuntu-vm-disk --image-project ubuntu-os-cloud --image-family ubuntu-1604-lts --zone us-central1-a
$ gcloud compute images create ubuntu-nested-vm-image \
--source-disk ubuntu-vm-disk --source-disk-zone us-central1-a \
--licenses "https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx"
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
case class DadosFinanciamento(valorFinanciado: Double, | |
amortizacao: Double, | |
parcelas: Int, | |
jurosMensal: Double) | |
case class ParcelaCalculada(numDaParcela: Int, | |
valor: Double, | |
jurosSobreSaldo: Double, | |
saldoDevedor: Double) { |
NewerOlder