Skip to content

Instantly share code, notes, and snippets.

View contract.go
// 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 Sep 15, 2018
Log deletion script for ELK-stack logs written in Go
View main.go
package main
import (
"context"
"flag"
log "github.com/sirupsen/logrus"
"gopkg.in/olivere/elastic.v6"
"os"
"strings"
"time"
@zupzup
zupzup / main.go
Created Jul 14, 2017
Example for Basic AST Traversal in Go
View main.go
package main
import (
"fmt"
"go/ast"
"go/parser"
"go/printer"
"go/token"
"log"
"os"
View app.rs
#[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;
View some_file.rs
#[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
container juggler examples
View container-juggler.yml
templateFolderPath: ./templates/
scenarios:
auth:
- redis
- auth-db
- auth-service
@zupzup
zupzup / container-juggler.yml
Created May 26, 2020
container-juggler yml example
View container-juggler.yml
templateFolderPath: ./templates/
scenarios:
auth:
- redis
- auth-db
- auth-service
View docker-compose.yml
auth-service:
extra_hosts:
- other-service:192.168.8.110
- other-service-db:192.168.8.110
...
View redis.yml
image: redis:5.0.3
ports:
- "6379:6379"
View shell
container-juggler generate auth
You can’t perform that action at this time.