Skip to content

Instantly share code, notes, and snippets.

@gaodeng
gaodeng / verify.js
Last active February 11, 2019 06:24
electron 4.x dsa verify bug
(function verifyDSA() {
let buf = Buffer.from([48, 44, 2, 20, 118, 46, 187, 203, 7, 168, 186, 182, 116, 28, 48, 54, 85, 56, 242, 185, 19, 214, 26, 179, 2, 20, 113, 4, 222, 176, 63, 109, 46, 3, 128, 146, 182, 84, 238, 67, 212, 182, 42, 26, 62, 51]);
let publicKey = `-----BEGIN PUBLIC KEY-----
MIHwMIGoBgcqhkjOOAQBMIGcAkEAmYrgU2Ts6pMYXSR6rqN0itG/WFzW6xFdjTy8
MVYhnico3i2NIpy+EraW5eHzjS2K5obYM2+78628NiDaSd1DrQIVAJ52LqNirlw3
WXipDgUARabiH1ppAkBsVui+NGpXqFgyh+Gd60Ac8DHeHfRhrf38ZnJyYrCj7TZV
cYDEAPOnssPXvgj82p8DMwgdUfr1lqBWIPaDHjiVA0MAAkAzwyA2MdQy+dhXiNEg
1JdOm8bs7DY4Vf0D1Nh8Vd30wJT9J74WSCdbHEPoag0T4qcPfLZKyetVwtYZPKcP
aWE2
-----END PUBLIC KEY-----`;
@gaodeng
gaodeng / curl.sh
Created May 2, 2018 15:26 — forked from davimacedo/curl.sh
Example of importing data with cloud functions
curl -X POST \
-H "X-Parse-Application-Id: LL9oIdzIkmwl5xyowQQu0fTmXyUWfet9RuAzwHfj" \
-H "X-Parse-REST-API-Key: R3S8PYQKuzeV4c8MUeO5ved46C50MEp56boDHW1O" \
-H "Content-Type: application/json" \
-d @data.json \
https://parseapi.back4app.com/functions/import
@gaodeng
gaodeng / curl.sh
Created May 2, 2018 15:26 — forked from davimacedo/curl.sh
Example of exporting data with cloud functions
curl -X POST \
-H "X-Parse-Application-Id: YKjNQyNBBsaJpRlcSRxBfR3yKCGdU395XzZfqjdB" \
-H "X-Parse-REST-API-Key: JBDMxg9uyvbq7FQdd44EtSKDLdDlIrRrP6EIvFZJ" \
-H "Content-Type: application/json" \
-d '{"exportClass": "MyClass"}' \
https://parseapi.back4app.com/functions/export > out.json