Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am fortmarek on github.
  • I am marekfort (https://keybase.io/marekfort) on keybase.
  • I have a public key ASD6qyKNoojcWFUgJYvhaRJYh0dknrgTUBSBJc_aJl_Wswo

To claim this, I am signing this object:

package gjk.zapalky;
import java.awt.Point;
import java.util.*;
public class matches implements gjk.zapalky.IHrac{
private Random generator = new Random();
private boolean [][] plan;
private List<Point> list = new ArrayList<>();
private List<Point> originalList = new ArrayList<>();
@fortmarek
fortmarek / medium-native-explore.css
Created May 3, 2017 20:47
medium-native-explore
/* Note: 1px = 1dp in this css */
/* == Colors == */
body {
background-color: #FFFFFF;
}
.title-link {
color: #000000;
}
.button {
private func testContract() {
}
HDKey.Private.create(
with: MnemonicStorageStrategy(walletStorage),
mnemonic: sentence,
network: .main,
path: [
KeyPathNode(at: 44, hardened: true),
KeyPathNode(at: 60, hardened: true),
KeyPathNode(at: 0, hardened: true),
KeyPathNode(at: 0),
]
let testContractAddress = try! Address(describing: "0xb8f016F3529b198b4a06574f3E9BDc04948ad852")
query.helloContract(at: testContractAddress).testString(greetString: "Greetings!").send(using: key, amount: Wei(10)).startWithResult { result in
switch result {
case .success(let hash):
print(hash)
print("Test greetings succeeded!")
case .failure(let error):
print(error)
print("Test greetings failed.")
}
platform :ios, '10.3'
project 'EthereumContracts'
inhibit_all_warnings!
use_frameworks!
target 'EthereumContracts' do
pod 'ContractCodegen', '~> 0.1'
end
let walletStorage = KeychainStorageStrategy(identifier: "cz.ackee.etherkit.example")
let key = HDKey.Private(walletStorage, network: .rinkeby, path: [
KeyPathNode(at: 44, hardened: true),
KeyPathNode(at: 60, hardened: true),
KeyPathNode(at: 0, hardened: true),
KeyPathNode(at: 1),
])
// Use your own mnemonic sentence
let sentence: Mnemonic.MnemonicSentence = Mnemonic.MnemonicSentence(["truly", "law", "tide", "pony", "media", "degree", "two", "goat", "ignore", "twice", "project", "message", "vanish", "spring", "movie"])
let walletStorage = KeychainStorageStrategy(identifier: "cz.ackee.etherkit.example")
HDKey.Private.create(
with: MnemonicStorageStrategy(walletStorage),
mnemonic: sentence,
network: .main,
path: [
KeyPathNode(at: 44, hardened: true),
private var urlSession: URLSession?
private func upload() {
if urlSession == nil {
let config = URLSessionConfiguration.background(withIdentifier: (Bundle.main.bundleIdentifier ?? "") + UUID().uuidString)
urlSession = URLSession(configuration: config, delegate: self, delegateQueue: nil)
}
}
extension ViewController: URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate {