Skip to content

Instantly share code, notes, and snippets.

View bvolpato's full-sized avatar
:shipit:
ship it

Bruno Volpato bvolpato

:shipit:
ship it
View GitHub Profile
@bvolpato
bvolpato / TextToBigQueryStreamingCustom.java
Created August 7, 2023 03:07
TextToBigQueryStreamingCustom
import com.google.api.services.bigquery.model.TableFieldSchema;
import com.google.api.services.bigquery.model.TableReference;
import com.google.api.services.bigquery.model.TableRow;
import com.google.api.services.bigquery.model.TableSchema;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.channels.Channels;
@bvolpato
bvolpato / nvme.sh
Created July 27, 2022 23:56
Check NVMe Health/Life
sudo smartctl -a /dev/nvme0 | grep -i Used
@bvolpato
bvolpato / container-os.sh
Last active June 27, 2022 22:27
Resize GCP disk
sudo /usr/share/cloud/resize-stateful
@bvolpato
bvolpato / Clusters.java
Created August 27, 2020 18:23
DFS - Number of Clusters
import java.util.Scanner;
/**
* DFS Number of Groups Java Implementation
*/
public class Clusters {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
@bvolpato
bvolpato / BellmanFord.java
Last active June 27, 2022 22:33
Algorithm - Bellman-Ford
import java.util.Scanner;
/**
* Bellman-Ford Java Implementation
*/
public class BellmanFord {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
@bvolpato
bvolpato / ShortestPathDijkstra.java
Last active August 27, 2020 18:14
Algorithm - Dijkstra
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Scanner;
import java.util.Set;
/**
* Dijkstra Java Implementation
@bvolpato
bvolpato / FloydWarshall.java
Last active August 27, 2020 18:18
Algorithm - Floyd-Warshall
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
/**
* Floyd-Warshall Java Implementation
*/
public class FloydWarshall {
public static void main(String[] args) {
@bvolpato
bvolpato / id_rsa.pub
Created August 1, 2019 16:06
publickey
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDgIRsZ+r4Ycj73pzcITmaLbBF3hRCpNnMYeY/j0UPT8xDwEltKEL1TIoqIZWv+SkEv4PqGo1Cw+6VQX21RfLD/gx10yA1S/fqOEMSp6U6L+m/T+PkZ/uNaple+oUrKfjKAPB+V+sxeH38xWktdkZsTPr5Gqb3ngkrCt46me/UPxwtA0/1DuPY1hgZClmp/EbgLScT8FpNBEwdJO+CEx3H1BFqzG2UgbxRgvVnGjrJmTIwKppOC3cuU8rhbTP+jeIE+kJaD47lFqV+K44uvCQQeQ6g3Vjp3Q4HZ0FO7SxEp9Gor25yHOQrlfdlmWjEZFsliwNRRTAp1Yj+uT98EEKWr brunocvcunha@gmail.com
@bvolpato
bvolpato / install.sh
Created March 12, 2019 06:43
Node Exporter
sudo useradd --no-create-home --shell /bin/false node_exporter
wget https://github.com/prometheus/node_exporter/releases/download/v0.17.0/node_exporter-0.17.0.linux-amd64.tar.gz
tar zxvf node_exporter-0.17.0.linux-amd64.tar.gz
cp node_exporter-0.17.0.linux-amd64/node_exporter /usr/local/bin
chown node_exporter:node_exporter /usr/local/bin/node_exporter
curl https://gist.githubusercontent.com/brunocvcunha/ccf7f5e53e0fbe4684c94cb1f4d2add3/raw/d5b6ead5671e1b2b7a1a4e6a08b0b261cc9a311a/node_exporter.service > /etc/systemd/system/node_exporter.service
systemctl daemon-reload
@bvolpato
bvolpato / node_exporter.service
Created March 12, 2019 06:42
node_exporter.service
[Unit]
Description=Node Exporter
Wants=network-online.target
After=network-online.target
[Service]
User=node_exporter
Group=node_exporter
Type=simple
ExecStart=/usr/local/bin/node_exporter