Cheat Sheet - Http Client SSL TLS Configuration for Java, Kotlin and Scala with example http requests
The examples below use the base ssl configuration found here: SSLConfig of the library: Ayza
Java
| using System; | |
| using System.Runtime.InteropServices; | |
| namespace ATIDisplay | |
| { | |
| static class Kernel32 | |
| { |
| ##################################################################################### | |
| # SKR v1.3 Configuration for Ender 3/Ender 3 PRO | |
| # X, Y, Z and E are Eryone TMC2208 v1.2 in UART Mode. | |
| # BLTouch | |
| # Source: https://gist.github.com/zwnk/92066555145cddecfd7df92a713dc5f1 | |
| ##################################################################################### | |
| [mcu] | |
| serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00 |
| package kotterknife | |
| import android.app.Activity | |
| import android.app.Dialog | |
| import android.app.DialogFragment | |
| import android.app.Fragment | |
| import android.arch.lifecycle.Lifecycle | |
| import android.arch.lifecycle.LifecycleObserver | |
| import android.arch.lifecycle.LifecycleOwner | |
| import android.arch.lifecycle.OnLifecycleEvent |
Tuning Intel Skylake and beyond for optimal performance and feature level support on Linux:
Note that on Skylake, Kabylake (and the now cancelled "Broxton") SKUs, functionality such as power saving, GPU scheduling and HDMI audio have been moved onto binary-only firmware, and as such, the GuC and the HuC blobs must be loaded at run-time to access this functionality.
Enabling GuC and HuC on Skylake and above requires a few extra parameters be passed to the kernel before boot.
Instructions provided for both Fedora and Ubuntu (including Debian):
Note that the firmware for these GPUs is often packaged by your distributor, and as such, you can confirm the firmware blob's availability by running:
| @file:Suppress("NOTHING_TO_INLINE") | |
| import kotlin.experimental.and // Used for Byte | |
| import kotlin.experimental.inv // Used for Byte | |
| import kotlin.experimental.or // Used for Byte | |
| inline fun Int.hasFlag(flag: Int) = flag and this == flag | |
| inline fun Int.withFlag(flag: Int) = this or flag | |
| inline fun Int.minusFlag(flag: Int) = this and flag.inv() |
| #define _CRT_SECURE_NO_WARNINGS | |
| #include <cstdio> | |
| #include <cstdint> | |
| #include <memory> | |
| #include <map> | |
| #include <list> | |
| #include <vector> | |
| #include <set> | |
| #include <algorithm> | |
| #include "crypto.h" |
| /* | |
| Scramble/descramble raw NAND dumps from the NES Classic. | |
| plutoo 2016 | |
| Cheers to brizzo, derrek. | |
| */ | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdint.h> |
| class Event<T> { | |
| private val handlers = arrayListOf<(T) -> Unit>() | |
| operator fun plusAssign(handler: (T) -> Unit) { handlers.add(handler) } | |
| operator fun invoke(value: T) { for (handler in handlers) handler(value) } | |
| } | |
| val e = Event<String>() // define event | |
| fun main(args : Array<String>) { | |
| e += { println(it) } // subscribe |