Skip to content

Instantly share code, notes, and snippets.

View masihyeganeh's full-sized avatar

Masih Yeganeh masihyeganeh

View GitHub Profile
@masihyeganeh
masihyeganeh / banks.json
Created September 20, 2018 21:55
Map of SHEBA and card number to bank name
{
"sheba": {
"55": "اقتصاد نوین",
"63": "انصار",
"69": "ایران زمین",
"54": "پارسیان",
"57": "پاسارگاد",
"21": "پست بانک",
"62": "آینده",
"18": "تجارت",

KSQL Stuffs

To Aggregate watchtime

Aparat

CREATE STREAM APARAT_WATCH (ip VARCHAR, req_ip VARCHAR, vid BIGINT, uid VARCHAR, userid BIGINT, afcn VARCHAR, session_id VARCHAR, profile VARCHAR, watch DOUBLE, progress DOUBLE, position BIGINT, duration VARCHAR, timestamp BIGINT, payload_time BIGINT, chunkname VARCHAR, download INTEGER, watch_type VARCHAR) WITH (kafka_topic='aparat_watch', value_format='JSON', timestamp='timestamp');

Output of cored-00-val tx assetft issue MYFT4 cmyft4 2 10000000 "My first FT token" --from devcore1qqnhyr59smec46hjh4gcrvwl4z6lsmxzdqmwzc -b block -y:

code: 0
codespace: ""
data: 12230A212F636F7265756D2E61737365742E66742E76312E456D707479526573706F6E7365
events:
- attributes:
  - index: true
    key: spender
    value: devcore1qqnhyr59smec46hjh4gcrvwl4z6lsmxzdqmwzc
code: 0
codespace: ""
data: 12370A312F6962632E6170706C69636174696F6E732E7472616E736665722E76312E4D73675472616E73666572526573706F6E736512020806
events:
- attributes:
- index: true
key: spender
value: devcore1sdqlqnra20585zerqdwgjfvy0059l5fw9gwp29
- index: true
key: amount