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
[ | |
{ | |
"uuid": "037fa69d-cc52-4d9c-90e1-68d12c455fbd", | |
"name": "My Name", | |
"blobs" : [ | |
{ | |
"uuid": "77bcfc71-1c2a-4872-b11d-501d65afd01a", | |
"url": "https://www.foo.bar/path/to/blob1", | |
"checksum": "MTIzNDU2Nzg5" | |
}, |
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
package firebase.jwt; | |
import javax.inject.Inject; | |
import com.google.firebase.auth.FirebaseAuthException; | |
import io.micronaut.http.HttpRequest; | |
import io.micronaut.http.annotation.*; | |
import io.micronaut.security.annotation.Secured; | |
import io.micronaut.security.authentication.UserDetails; | |
import io.micronaut.security.rules.SecurityRule; |
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
package firebase.jwt; | |
import java.util.Optional; | |
public class AuthHeader { | |
private final String type; | |
private final String token; | |
public AuthHeader(String type, String token) { | |
this.type = type; |
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
package firebase.jwt; | |
import com.google.auth.oauth2.GoogleCredentials; | |
import com.google.firebase.FirebaseApp; | |
import com.google.firebase.FirebaseOptions; | |
import com.google.firebase.auth.FirebaseAuth; | |
import com.google.firebase.auth.FirebaseAuthException; | |
import com.google.firebase.auth.FirebaseToken; | |
import io.micronaut.core.io.ResourceResolver; | |
import io.micronaut.core.io.scan.ClassPathResourceLoader; |
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
# Material desing #400 series of colors https://www.materialui.co/colors | |
[aws] | |
symbol = " " | |
[battery] | |
full_symbol = "" | |
charging_symbol = "" | |
discharging_symbol = "" |
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 | |
for server in "[email protected]" "[email protected]" "[email protected]" | |
do | |
echo "--- Deploying and starting Annosaurus at ${server}" | |
ssh $server <<'ENDSSH' | |
docker pull mbari/annosaurus:latest | |
docker stop annosaurus |
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 math | |
from dataclasses import dataclass | |
from typing import List | |
__author__ = "Brian Schlining" | |
__copyright__ = "Copyright 2019, Monterey Bay Aquarium Research Institute" | |
@dataclass | |
class Camera: |
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 io.reactivex.Observable; | |
import io.reactivex.subjects.PublishSubject; | |
import io.reactivex.subjects.Subject; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.concurrent.*; | |
import java.util.concurrent.atomic.AtomicInteger; | |
import java.util.function.Function; | |
import java.util.function.Supplier; |
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
// This function takes a page, which defines the limit and offset | |
// and makes the web service call using that limit/offset | |
Function<RequestPager.Page, List<MyObject>> function = (page) -> { | |
try { | |
return service.someApiCall(page.getLimit(), page.getOffset()) | |
.get(timeout.toMillis(), TimeUnit.MILLISECONDS); | |
} catch (Exception e) { | |
throw new RuntimeException("A page request failed", e); | |
} | |
}; |
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 io.reactivex.Observable; | |
import java.util.function.Supplier; | |
/** | |
* Wrapper around a Supplier (intended to be making remote service request), | |
* that will attempt to retry a request if an exception occurs. | |
* | |
* @author Brian Schlining | |
* @since 2019-04-24T13:54:00 |