I hereby claim:
- I am swallez on github.
- I am swallez (https://keybase.io/swallez) on keybase.
- I have a public key whose fingerprint is E866 62A9 D259 55DF 2DDC BB19 C9B5 A6EC E2D7 74DF
To claim this, I am signing this object:
import javax.net.ssl.SSLContext; | |
import javax.net.ssl.SSLSocketFactory; | |
import javax.net.ssl.X509TrustManager; | |
import java.security.cert.X509Certificate; | |
public class SSLUtils { | |
private static SSLContext yesCtx = null; | |
/** | |
* Returns an SSLContext that will accept any server certificate. |
use macroquad::prelude::*; | |
#[macroquad::main("Cercles fractals")] | |
async fn main() { | |
loop { | |
clear_background(LIGHTGRAY); | |
circles(0, screen_width() / 2.0, screen_height()/2.0, 150.0, 0); | |
next_frame().await | |
} | |
} |
// Example of static methods in Rust traits, to illustrate this tweet: | |
// https://twitter.com/bluxte/status/1316315285356531712 | |
// | |
// Try it in the Rust playground at | |
// https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=524057bcc33ea47ddefad9f0b31146e3 | |
/// Something that has a name and can say it | |
trait NamedThing { | |
/// Static method | |
fn new(name: String) -> Self; |
<project name="scala-services" default="junitreport"> | |
<target name="junitreport"> | |
<mkdir dir="./target/test-html"/> | |
<junitreport> | |
<fileset dir="./target/test-reports"> | |
<include name="TEST-*.xml"/> | |
</fileset> | |
<report todir="./target/test-html"/> |
import java.util.concurrent.atomic.AtomicReference | |
import scala.concurrent.{Await, ExecutionContext, Future, Promise} | |
import scala.concurrent.duration._ | |
object CacheUtils { | |
private case class CacheInfo[T](p: Promise[T], expires: Long) { | |
/* Return the promise if it's not yet completed or hasn't expired */ | |
def get: Option[Promise[T]] = { |
import com.fasterxml.jackson.databind.{JsonNode, ObjectMapper} | |
import com.fasterxml.jackson.databind.node._ | |
import scala.language.implicitConversions | |
object JacksonDSL { | |
// Builder objects using varargs |
I hereby claim:
To claim this, I am signing this object: