val user = User(id = "id", name = "Ruby")
val userFragment: UserFragment = newFragment<User, UserFragment>(user)
crypto-config | |
├── ordererOrganizations | |
│ └── example.com | |
│ ├── ca | |
│ │ ├── 9f38d6dff629be39fa52c783065ee49865352591fab211df5a5035c700600b0c_sk | |
│ │ └── ca.example.com-cert.pem | |
│ ├── msp | |
│ │ ├── admincerts | |
│ │ │ └── [email protected] | |
│ │ ├── cacerts |
fun main(args: Array<String>) { | |
println("a" to "b") | |
println("a" to "b" tre "c") | |
println("a" to "b" tre "c" fo "d") | |
println("a" to "b" tre "c" fo "d" fi "e") | |
println("a" to "b" tre "c" fo "d" fi "e" sik "f") | |
println("a" to "b" tre "c" fo "d" fi "e" sik "f" seva "g") | |
} | |
infix fun <A, B, C> Pair<A, B>.tre(c: C) = Triple(first, second, c) |
https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
contract ERC20 {
function totalSupply() constant returns (uint theTotalSupply);
function balanceOf(address _owner) constant returns (uint balance);
function transfer(address _to, uint _value) returns (bool success);
function transferFrom(address _from, address _to, uint _value) returns (bool success);
function approve(address _spender, uint _value) returns (bool success);
import java.io.IOException; | |
import java.lang.annotation.Annotation; | |
import java.lang.reflect.Type; | |
import io.reactivex.Completable; | |
import io.reactivex.Observable; | |
import io.reactivex.ObservableSource; | |
import io.reactivex.Single; | |
import io.reactivex.SingleSource; | |
import io.reactivex.annotations.NonNull; |
[ req ] | |
default_bits = 2048 | |
default_keyfile = server-key.pem | |
distinguished_name = subject | |
req_extensions = req_ext | |
x509_extensions = x509_ext | |
string_mask = utf8only | |
# The Subject DN can be formed using X501 or RFC 4514 (see RFC 4519 for a description). | |
# Its sort of a mashup. For example, RFC 4514 does not provide emailAddress. |
/** | |
* RxJava2 and Retrofit 2.2.0 compatible factory, | |
* which wraps the {@link RxJava2CallAdapterFactory} and takes care of the error conversion. | |
* | |
* Based on: https://github.com/square/retrofit/issues/1102#issuecomment-241250796 | |
*/ | |
public class RxErrorHandlingCallAdapterFactory extends CallAdapter.Factory { | |
private final RxJava2CallAdapterFactory mOriginalCallAdapterFactory; | |
private RxErrorHandlingCallAdapterFactory() { |
This guide shows how to set up a bidirectional client/server authentication for plain TLS sockets.
Newer versions of openssl are stricter about certificate purposes. Use extensions accordingly.
Generate a Certificate Authority:
Here is a script to take the hosts from From http://pgl.yoyo.org/adservers/ and convert them to rules for Little Snitch.
It has options to grab the entire list or grab new entries past a certain date.
Just grab the output and copy/paste into Little Snitch.
The script is written to block access to any process, any port. You can also delete those lines and it will only block Mail. Or use the options to enter any process, port or protocol you want to block.
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.