Skip to content

Instantly share code, notes, and snippets.

// This file is an automatically generated Go binding. Do not modify as any
// change will likely be lost upon the next re-generation!
package main
import (
"math/big"
"strings"
"github.com/ethereum/go-ethereum/accounts/abi"
@zupzup
zupzup / main.go
Created September 15, 2018 14:17
Log deletion script for ELK-stack logs written in Go
package main
import (
"context"
"flag"
log "github.com/sirupsen/logrus"
"gopkg.in/olivere/elastic.v6"
"os"
"strings"
"time"
@zupzup
zupzup / app.rs
Created March 18, 2020 14:46
test gist
#[derive(Clone)]
pub struct JobContext {
pub db_pool: DBPool,
pub redis_pool: RedisPool,
}
pub trait Job {
fn run(&self, ctx: &JobContext) -> JobResult;
fn get_interval(&self) -> Duration;
fn get_name(&self) -> &'static str;
@zupzup
zupzup / some_file.rs
Created March 18, 2020 14:53
some_gist
#[derive(Clone)]
pub struct JobContext {
pub db_pool: DBPool,
pub redis_pool: RedisPool,
}
pub trait Job {
fn run(&self, ctx: &JobContext) -> JobResult;
fn get_interval(&self) -> Duration;
fn get_name(&self) -> &'static str;
@zupzup
zupzup / container-juggler.yml
Created May 26, 2020 14:13
container juggler examples
templateFolderPath: ./templates/
scenarios:
auth:
- redis
- auth-db
- auth-service
@zupzup
zupzup / container-juggler.yml
Created May 26, 2020 14:15
container-juggler yml example
templateFolderPath: ./templates/
scenarios:
auth:
- redis
- auth-db
- auth-service
auth-service:
extra_hosts:
- other-service:192.168.8.110
- other-service-db:192.168.8.110
...
image: redis:5.0.3
ports:
- "6379:6379"
container-juggler generate auth
@zupzup
zupzup / Cargo.toml
Created October 29, 2020 13:19
Timeular Public API Cargo.toml
[dependencies]
reqwest = { version = "0.10", features = ["json"] }
tokio = { version = "0.2", features = ["macros", "fs"] }
serde = {version = "1.0", features = ["derive"] }
serde_json = "1.0"
once_cell = "1.4"