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
FROM openjdk:19-buster | |
ENV MB_PLUGINS_DIR=/home/plugins/ | |
ADD https://downloads.metabase.com/v0.50.26/metabase.jar /home/ | |
ADD https://github.com/MotherDuck-Open-Source/metabase_duckdb_driver/releases/download/0.2.9/duckdb.metabase-driver.jar /home/plugins/ | |
RUN chmod 744 /home/plugins/duckdb.metabase-driver.jar | |
CMD ["java", "-jar", "/home/metabase.jar"] |
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
# local machine | |
$ gcloud --project "..." app instances ssh "..." --service "default" --version "..." | |
# app engine flex instance | |
$ docker ps | |
$ docker exec -it 2284fbe5c3bc bash | |
# docker container running on app engine flex instance | |
root@2284fbe5c3bc:/app$ bundle exec rake middleware |
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
#!/usr/bin/env bash | |
# Step 1: clone the repository from the old remote | |
# Step 2: add the new remote | |
# Based on https://gist.github.com/grimzy/a1d3aae40412634df29cf86bb74a6f72 | |
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done | |
git fetch --all | |
git pull --all | |
git push --all new-remote |
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
var moment = require('moment'); | |
var _ = require('lodash'); | |
var Benchmark = require('benchmark'); | |
var suite = new Benchmark.Suite; | |
// Exemplo: preenchendo de 8:00 às 18:00 com slots de 30 minutos | |
suite.add('Adding numbers', function() { | |
// Conversão de string "8:30" para número (8 * 60 + 30) e vice-versa | |
function timeStringToNumber(timeString) { | |
return moment.duration(timeString).asMinutes() |
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
import com.rabbitmq.client.Connection; | |
import com.rabbitmq.client.Channel; | |
import com.rabbitmq.client.ConnectionFactory; | |
//import com.rabbitmq.client.QueueingConsumer; | |
import com.rabbitmq.client.GetResponse; | |
import com.rabbitmq.client.AMQP; | |
//import com.rabbitmq.client.*; | |
//import com.rabbitmq.client.MessageProperties; | |
//import com.rabbitmq.client.AlreadyClosedException; |