Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
I may be slow to respond.

Cesar Alvernaz calvernaz

🎯
I may be slow to respond.
View GitHub Profile
View tf.tf
resource "aws_api_gateway_rest_api" "api" {
name = "example"
}
resource "aws_api_gateway_resource" "resource" {
rest_api_id = aws_api_gateway_rest_api.api.id
parent_id = aws_api_gateway_rest_api.api.root_resource_id
path_part = "resource"
}
@calvernaz
calvernaz / json
Created Jan 3, 2022
PetStore template
View json
{
"swagger": "2.0",
"info": {
"description": "Your first API with Amazon API Gateway. This is a sample API that integrates via HTTP with our demo Pet Store endpoints",
"title": "PetStore"
},
"schemes": [
"https"
],
"paths": {
View gist:8ba659a43bf5d547f4276f3ba3a3c1c9
# VERSIONS
LORA_VERSION=3
# CREDENTIALS
REDIS_PASSWORD=p4ssw0rd
POSTGRES_PASSWORD=p4ssw0rd
MQTT_PASSWORD=p4ssw0rd
View docker-compose.yml
version: '2.2'
services:
mysql:
container_name: mysql
image: bitnami/mysql:latest
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_USER=admin
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=livedata
View keybase.md

Keybase proof

I hereby claim:

  • I am calvernaz on github.
  • I am calvernaz (https://keybase.io/calvernaz) on keybase.
  • I have a public key whose fingerprint is 2A50 B47F A574 981D 978C 7A04 5AA5 1692 F4F3 1D2D

To claim this, I am signing this object:

View BatchQueue.java
package org.weirdloop;
import org.jctools.queues.atomic.SpscAtomicArrayQueue;
import java.util.Collection;
import java.util.Timer;
import java.util.TimerTask;
import java.util.function.Consumer;
class BatchQueue<T> {
View gist:6a80b2f58ac59ba6975435e02329cbac
package flatten
// FlattenCopy flattens array of integers
// using the built-in copy function
func FlattenCopy(arr [][]int) []int {
r := make([]int, len(arr))
i := 0
for _, a := range arr {
if len(a) + i <= cap(r) {
copy(r[i:], a)
View main.go
package main
import (
"fmt"
"log"
"os"
"os/signal"
"syscall"
"time"
"math/rand"
@calvernaz
calvernaz / gist:07fada864bab5e419afd29a328717fe1
Last active Jun 16, 2018
Debug GAE using Go and Goland IDE
View gist:07fada864bab5e419afd29a328717fe1
1. tar xfvz google-cloud-sdk-204.0.0-darwin-x86_64.tar.gz
2. ./google-cloud-sdk/install.sh
3. source ~/.config/fish/config.fish
4. gcloud init
5. gcloud components install app-engine-go