Skip to content

Instantly share code, notes, and snippets.

View sonOfRa's full-sized avatar

Simon Levermann sonOfRa

View GitHub Profile
import org.jgrapht.DirectedGraph;
import org.jgrapht.graph.DefaultDirectedGraph;
import org.jgrapht.graph.DefaultEdge;
/**
* This class uses a graph and the gestures given in the GestureType Enumeration
* to decide which gesture beats another one.
*
*
*/
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
04:00:bc:ba:10:41:9f:0c:e0:0a:22:75:4f:ec:63:4d:cc:70
Signature Algorithm: sha256WithRSAEncryption
Issuer: C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
Validity
Not Before: Jan 20 02:25:21 2020 GMT
Not After : Apr 19 02:25:21 2020 GMT
@Configuration
@ConfigurationProperties(prefix = "your.prefix")
public class ConfigThings {
private String name;
private int expiration;
// Getters, setters
}
gradle clean cAT --stacktrace
executing gradlew instead of gradle
R8: The rule `-keep public class * extends androidx.versionedparcelable.VersionedParcelable {
<init>();
}` uses extends but actually matches implements.
> Task :app:transformClassesAndResourcesWithR8ForDebugAndroidTest FAILED
R8: Missing class: org.easymock.IArgumentMatcher
R8: Missing class: org.jmock.core.Constraint
R8: 'void onAddFinished(androidx.recyclerview.widget.RecyclerView$ViewHolder)' and 'void dispatchRemoveStarting(androidx.recyclerview.widget.RecyclerView$ViewHolder)' map to same name: 'k'
#include <stdio.h>
void top() {
printf("I'm at the top\n");
}
int main(int argc, char** argv) {
top();
return 0;
}
$ sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/javac to provide /usr/bin/javac (javac) in manual mode
The command "sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac" exited with 0.
0.01s$ sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java to provide /usr/bin/java (java) in manual mode
The command "sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java" exited with 0.
0.00s$ which java
/usr/local/lib/jvm/openjdk11/bin/java
The command "which java" exited with 0.
NaNs$ java -version
@sonOfRa
sonOfRa / CPU
Last active December 17, 2019 17:05
Boyer-Moore vs Naive substring search
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 60
model name : Intel(R) Core(TM) i7-4771 CPU @ 3.50GHz
stepping : 3
microcode : 0x27
cpu MHz : 2673.855
cache size : 8192 KB
physical id : 0
@sonOfRa
sonOfRa / Bad haystack Java 11
Last active December 17, 2019 15:38
Boyer-Moore vs naive Java indexOf with larger strings; Haystack is 100k times the string
# OpenJDK Runtime Environment (build 11.0.5-ea+10-post-Ubuntu-0ubuntu1)
Benchmark Mode Samples Score Score error Units
c.z.MyBenchmark.boyerMoore thrpt 200 94.480 2.009 ops/s
c.z.MyBenchmark.java thrpt 200 42.771 0.190 ops/s
# Hello, nanana world! I anana am a string; perhaps nanas I can ananate how, anana for ananananananars, and nanas more!
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.acme</groupId>
<artifactId>receipts</artifactId>
<version>1.0.0-SNAPSHOT</version>
openssl ciphers -tls1_3 | tr ':' '\n' | grep GCM | grep AES128
ECDHE-ECDSA-AES128-GCM-SHA256
ECDHE-RSA-AES128-GCM-SHA256
DHE-RSA-AES128-GCM-SHA256
RSA-PSK-AES128-GCM-SHA256
DHE-PSK-AES128-GCM-SHA256
AES128-GCM-SHA256
PSK-AES128-GCM-SHA256