Skip to content

Instantly share code, notes, and snippets.

View evbruno's full-sized avatar

Eduardo V. Bruno evbruno

View GitHub Profile
@evbruno
evbruno / go_bash_proc.go
Created February 4, 2025 14:23
go - handling processes (GPT)
# OpenAI/GPT version of https://gist.github.com/evbruno/13ba9181b64eeb063079d8d1146125b4
package main
import (
"fmt"
"os"
"os/exec"
"os/signal"
"slices"
@evbruno
evbruno / go_bash_proc.go
Created February 4, 2025 14:22
go - handling processes (Gemini)
# Gemini version of https://gist.github.com/evbruno/13ba9181b64eeb063079d8d1146125b4
package main
import (
"context"
"fmt"
"os"
"os/exec"
"os/signal"
@evbruno
evbruno / go_bash_proc.go
Created February 4, 2025 14:21
go - handling processes (v1)
# learning go day 3
package main
import (
"fmt"
"os"
"os/exec"
"os/signal"
"slices"
@evbruno
evbruno / dumb.md
Last active May 24, 2022 21:07
skelleton JS with fauna

shell

mkdir dumb-project && cd dumb-project
npm init -y
yarn add faunadb
docker run -p 8443:8443 fauna/faunadb

index.js

@evbruno
evbruno / Dockerfile
Created April 21, 2022 12:37
docker build / buildkit
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
@evbruno
evbruno / faunadb-dotnet.md
Last active May 4, 2020 19:58
faunadb csharp hello world

FaunaDB csharp dotnet sample Solution

Create new Console App

$ dotnet new console -o faunadb-app -f netcoreapp3.1

The template "Console Application" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on faunadb-app/faunadb-app.csproj...
@evbruno
evbruno / JenkinsBuilds.groovy
Created April 21, 2020 21:04
Delete Jenkins builds
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()
@evbruno
evbruno / fiis.sh
Created March 12, 2020 13:41
Pegar nome do Administrador do FII
#!/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
@evbruno
evbruno / proxy.go
Created February 26, 2020 13:32
Go Proxy Go
// eg: go run proxy.go -url http://localhost:8443
package main
import (
"fmt"
"log"
"flag"
//"bytes"
//"io/ioutil"
"net/http"
@evbruno
evbruno / FaunaHelloWorld.cs
Created February 25, 2020 21:11
Fauna Hello World
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
{