Skip to content

Instantly share code, notes, and snippets.

@NeoTeo
NeoTeo / ContentView.swift
Created November 8, 2019 18:22
Investigation into ObservableObject
import SwiftUI
public class MyClass {
public var label: String = "init class"
func update(newLabel: String) {
label = newLabel
}
}
import SwiftUI
struct ContentView: View {
@State var a: Bool = false
var body: some View {
A(a: $a)
}
}

Keybase proof

I hereby claim:

  • I am neoteo on github.
  • I am neoteo (https://keybase.io/neoteo) on keybase.
  • I have a public key ASANMg5KkQXMlMJPUZJaDFmWo1nnsHbhlElNAQAGrTt3vwo

To claim this, I am signing this object:

@NeoTeo
NeoTeo / README.md
Last active April 12, 2017 11:33
README.md template for modules

PROJECT NAME

A one-line project description.

A longer description of the project.

Install

Installation/build instructions.

@NeoTeo
NeoTeo / gist:08b49de8a2893c3fd2befb2deb5b5f08
Created March 2, 2017 21:44
wireshark non chunked non streaming ascii & hex dump
POST /api/v0/add?stream-channels=true HTTP/1.1
Host: 127.0.0.1:5001
Content-Type: multipart/form-data; boundary=Cvs9r5xl2RR8wKcdA40WNEl9vgkOVFjw
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: Swift IPFS Client
Content-Length: 10204
Accept-Language: en-us
Connection: keep-alive
@NeoTeo
NeoTeo / gist:2aa7e2740c19302ec37a13566fb27442
Created March 2, 2017 17:56
wireshark hexdump swift api
00000000 50 4f 53 54 20 2f 61 70 69 2f 76 30 2f 61 64 64 POST /ap i/v0/add
00000010 3f 73 74 72 65 61 6d 2d 63 68 61 6e 6e 65 6c 73 ?stream- channels
00000020 3d 74 72 75 65 20 48 54 54 50 2f 31 2e 31 0d 0a =true HT TP/1.1..
00000030 48 6f 73 74 3a 20 31 32 37 2e 30 2e 30 2e 31 3a Host: 12 7.0.0.1:
00000040 35 30 30 31 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 5001..Co ntent-Ty
00000050 70 65 3a 20 6d 75 6c 74 69 70 61 72 74 2f 66 6f pe: mult ipart/fo
00000060 72 6d 2d 64 61 74 61 3b 20 62 6f 75 6e 64 61 72 rm-data; boundar
00000070 79 3d 6d 72 48 37 63 62 4a 56 4a 7a 47 4a 4c 58 y=mrH7cb JVJzGJLX
00000080 5a 77 68 7a 6e 4a 62 55 76 39 65 6c 68 6b 30 4e ZwhznJbU v9elhk0N
00000090 70 47 0d 0a 54 72 61 6e 73 66 65 72 2d 45 6e 63 pG..Tran sfer-Enc
@NeoTeo
NeoTeo / gist:fd7c7b57c6f8a879ebfb00fffbb94959
Created March 2, 2017 17:54
wireshark hexdump using ipfs client
00000000 50 4f 53 54 20 2f 61 70 69 2f 76 30 2f 61 64 64 POST /ap i/v0/add
00000010 3f 65 6e 63 6f 64 69 6e 67 3d 6a 73 6f 6e 26 70 ?encodin g=json&p
00000020 72 6f 67 72 65 73 73 3d 74 72 75 65 26 73 74 72 rogress= true&str
00000030 65 61 6d 2d 63 68 61 6e 6e 65 6c 73 3d 74 72 75 eam-chan nels=tru
00000040 65 20 48 54 54 50 2f 31 2e 31 0d 0a 48 6f 73 74 e HTTP/1 .1..Host
00000050 3a 20 31 32 37 2e 30 2e 30 2e 31 3a 35 30 30 31 : 127.0. 0.1:5001
00000060 0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 2f 67 ..User-A gent: /g
00000070 6f 2d 69 70 66 73 2f 30 2e 34 2e 36 2d 64 65 76 o-ipfs/0 .4.6-dev
00000080 2f 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 63 /..Conne ction: c
00000090 6c 6f 73 65 0d 0a 54 72 61 6e 73 66 65 72 2d 45 lose..Tr ansfer-E
@NeoTeo
NeoTeo / gist:235b8e6b38edb214a56bc7368fcbe843
Created March 2, 2017 17:53
wireshark dump using ipfs client
POST /api/v0/add?encoding=json&progress=true&stream-channels=true HTTP/1.1
Host: 127.0.0.1:5001
User-Agent: /go-ipfs/0.4.6-dev/
Connection: close
Transfer-Encoding: chunked
Content-Type: multipart/form-data; boundary=060868038e6ecedef3cd5968bc99c80d3cbe38194857f66747f07bc191bc
Accept-Encoding: gzip
1
-
00000000 50 4f 53 54 20 2f 61 70 69 2f 76 30 2f 61 64 64 POST /ap i/v0/add
00000010 3f 73 74 72 65 61 6d 2d 63 68 61 6e 6e 65 6c 73 ?stream- channels
00000020 3d 74 72 75 65 20 48 54 54 50 2f 31 2e 31 0d 0a =true HT TP/1.1..
00000030 48 6f 73 74 3a 20 31 32 37 2e 30 2e 30 2e 31 3a Host: 12 7.0.0.1:
00000040 35 30 30 31 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 5001..Co ntent-Ty
00000050 70 65 3a 20 6d 75 6c 74 69 70 61 72 74 2f 66 6f pe: mult ipart/fo
00000060 72 6d 2d 64 61 74 61 3b 20 62 6f 75 6e 64 61 72 rm-data; boundar
00000070 79 3d 76 62 4e 51 6c 51 75 5a 64 4b 66 54 6a 6a y=vbNQlQ uZdKfTjj
00000080 74 62 5a 4a 6b 7a 37 6d 77 30 31 72 46 53 43 39 tbZJkz7m w01rFSC9
00000090 61 49 0d 0a 54 72 61 6e 73 66 65 72 2d 45 6e 63 aI..Tran sfer-Enc
POST /api/v0/add?stream-channels=true HTTP/1.1
Host: 127.0.0.1:5001
Content-Type: multipart/form-data; boundary=vbNQlQuZdKfTjjtbZJkz7mw01rFSC9aI
Transfer-Encoding: Chunked
Accept: */*
User-Agent: Swift IPFS Client
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: keep-alive