You may need to configure a proxy server if you're having trouble cloning
or fetching from a remote repository or getting an error
like unable to access '...' Couldn't resolve host '...'.
Consider something like:
| package com.realkinetic.gcp.spring.oidc; | |
| import com.auth0.jwt.JWT; | |
| import com.auth0.jwt.algorithms.Algorithm; | |
| import com.auth0.jwt.interfaces.DecodedJWT; | |
| import com.google.api.client.http.*; | |
| import com.google.api.client.http.javanet.NetHttpTransport; | |
| import com.google.api.client.json.JsonObjectParser; | |
| import com.google.api.client.json.jackson2.JacksonFactory; | |
| import com.google.api.client.util.GenericData; |
| #!/bin/bash | |
| echo "-- New Migration" > "`dirname $0`/../src/main/resources/db/migrations/V`date +%s`__$1.sql" |
| contract SimpleWallet { | |
| // address is the owner | |
| address owner; | |
| struct WithdrawlStruct { | |
| address to; | |
| uint amount; | |
| } |
| package main | |
| import ( | |
| "bufio" | |
| "encoding/csv" | |
| "encoding/json" | |
| "fmt" | |
| "io" | |
| "os" | |
| "path/filepath" |
| // Worker represents the worker that executes the job | |
| type Worker struct { | |
| JobChannel chan Job | |
| quit chan bool | |
| } | |
| func NewWorker(jobChannel chan Job) Worker { | |
| return Worker{ | |
| JobChannel: jobChannel, | |
| quit: make(chan bool)} |
| package pool | |
| type Task interface { | |
| Execute(id int) | |
| } | |
| type Pool struct { | |
| tasks chan Task | |
| kill chan bool | |
| } |
| package main | |
| const MaxLength = 1 << 20 | |
| var ( | |
| addr = flag.String("listen", ":8000", "listen for requests") | |
| numprocs = flag.Int("p", runtime.NumCPU(), "number of workers to start") | |
| maxqueue = flag.Int("q", runtime.NumCPU()*2, "largest queue size") | |
| jobs chan Job |
A running example of the code from:
Small refactorings made to original code: