Skip to content

Instantly share code, notes, and snippets.

Below is page 2 of the Routledge Frequency Dictionary of German. This screenshot was taken using the "Look inside" feature of the Amazon product page for this book. The dictionary says it is based off the Leipzig/BYU Corpus of Contemporary German. Googling for information on this corpus turns up little or nothing.

Leipzig make available various corpora here but neither it nor Brigham Young University seem to have any web content related to something called the "Corpus of Contemporary German".

The dictionary says the corpus brings together words from spoken language, literature, newspapers, academic texts and instructional language. So the dictionary claims to use a broad based corpus and as its full title is "A Frequency Dictionary o

This page describes the flow of requests, tokens etc. when using the Okta sign-in widget with a backend (such as Spring Boot) that's configured for OAuth2 based authentication.

Okta Login flow

If I have a web-app running on myapp.mycompany.com and an Okta organization running on dev-993392.oktapreview.com then there are 3 actors involved in the login flow:

  • The server that serves up the myapp.mycompany.com pages.
  • Browser pages with origin myapp.mycompany.com.
  • Browser pages with origin dev-993392.oktapreview.com
// Compare IGroupable (with a type parameter) here with IGroupableX below (without a type argument).
// In what situation will the generics version buy you something that the non-generic version won't.
interface IGroupable<E extends IGroupable<E>> {
E fraction(double fraction);
public static class AlphaGroupable implements IGroupable<AlphaGroupable> {
@Override
public AlphaGroupable fraction(double fraction) { return null; }
}
diff --git a/gradle-plugins/cordformation/src/noderunner/kotlin/net/corda/plugins/NodeRunner.kt b/gradle-plugins/cordformation/src/noderunner/kotlin/net/corda/plugins/NodeRunner.kt
index 83462c2..0f3d67b 100644
--- a/gradle-plugins/cordformation/src/noderunner/kotlin/net/corda/plugins/NodeRunner.kt
+++ b/gradle-plugins/cordformation/src/noderunner/kotlin/net/corda/plugins/NodeRunner.kt
@@ -50,14 +50,20 @@ private abstract class JarType(private val jarName: String) {
}
val debugPort = debugPortAlloc.next()
println("Starting $jarName in $dir on debug port $debugPort")
- val process = (if (headless) ::HeadlessJavaCommand else ::TerminalWindowJavaCommand)(jarName, dir, debugPort, javaArgs, jvmArgs).start()
+ val appArgs = javaArgs + (if (headless) headlessArgs else headedArgs)
@george-hawkins
george-hawkins / .bashrc_prompt
Created March 1, 2018 10:06
Setup PS1 prompt
if [[ -n $SSH_CLIENT || -n $SSH_TTY ]]
then
PS1_HOST='\h'
else
PS1_HOST=localhost
fi
# Usually people use raw escape sequences for colors but you can lookup these sequences with tput.
BOLD=$(tput bold)
GREEN=$(tput setaf 2)

Note: this page is heavily chopped down from multiple earlier sources, so it doesn't hang together very well at this stage. It's now just a collection of facts and thoughts about Corda notaries.

How is a Corda notary different to a centralized DB?

Distributed DBs (both SQL and NoSQL) that guarantee eventual consistency have been around for a long time outside the world of distributed ledger.

How is a Corda notary really different to a centralized DB?

Note: whether behind the scenes a notary or centralized DB is implemented as a single system or as a distributed cluster is largely irrelevant to the primary parties involved (in a Corda environment that's the nodes).

@george-hawkins
george-hawkins / FooBar.kt
Last active June 11, 2018 11:24
Generic logic to walk both jar and filesystem isn't simple...
package com.example
import org.junit.Test
import java.net.URI
import java.net.URL
import java.nio.file.FileSystem
import java.nio.file.FileSystemNotFoundException
import java.nio.file.FileSystems
import java.nio.file.Files
import java.nio.file.Paths
package bookmarks
import org.springframework.beans.factory.annotation.Value
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.web.bind.annotation.RequestMethod
import springfox.documentation.builders.ApiInfoBuilder
import springfox.documentation.builders.PathSelectors
import springfox.documentation.builders.RequestHandlerSelectors
import springfox.documentation.builders.ResponseMessageBuilder
import org.springframework.context.annotation.Configuration
import org.springframework.core.annotation.Order
import org.springframework.security.config.annotation.web.builders.HttpSecurity
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
@Order(2)
@Configuration
class WebSecurityPublicConfiguration : WebSecurityConfigurerAdapter() {
// ResourceServerConfiguration invokes OAuth2ResourceServerConfiguration.ResourceSecurityConfigurer.configure
// which turns on authorization for all paths.

Vagrant walkthru

Assuming you've already got VirtualBox and Vagrant already installed, let's create a Vagrant box on which to run some of these nodes and get its IP address:

$ cd
$ mkdir foo-vagrant
$ cd foo-vagrant
$ vagrant init bento/ubuntu-18.04

$ vagrant up