Skip to content

Instantly share code, notes, and snippets.

View jaggedsoft's full-sized avatar
Productive

jagged jaggedsoft

Productive
View GitHub Profile
@jaggedsoft
jaggedsoft / sha256-hmac.md
Created September 3, 2020 14:05 — forked from jasny/sha256-hmac.md
Hashing examples in different languages

Example inputs:

Variable Value
key the shared secret key here
message the message to hash here

Reference outputs for example inputs above:

| Type | Hash |

API概述

交易市场概况和基础信息

撮合引擎

成交价

CoinAll撮合系统撮合订单的优先级按照价格优于时间的优先级来撮合,优先撮合价格更有优势的订单。当价格一致时按照下单时间顺序撮合,先下单的先撮合。 比如深度列表中目前有3笔挂单等待成交,分别为1: 9900USDT买1BTC,2: 10100USDT买2BTC,3: 9900USDT买1.5BTC。他们是按时间顺序1-2-3进入撮合系统的,根据价格优先,系统优先撮合订单2,根据时间优先,1跟3优先撮合1。所以系统撮合顺序是2-1-3。

@jaggedsoft
jaggedsoft / jaggedsoft pubkey.txt
Created February 24, 2019 16:37
jaggedsoft's public key (PGP)
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQINBFxyv2wBEADXFxSik3Ufw5jhaBnLoP/xctKvyy9CMO1nm/nig4idAd4+eOy8
UVxDzPBYNmx9PySCO/SEK6YD76TNRgcLeRLpJD1JsrHyQfdwchybPlxGjFlacQhm
B3dq7/V6lFxO1phmZhrxvVIgGVCEW2FKLMN4VEIk1tUnDCOP2UbN7gKdz8vIx9A4
vcG28laRDBNOfn91D/EBvVYWO3cdhWktAKAygBa8bb00sWTzpm/o20XMKAa3WVMV
ZU9FChI1C5njQBhrfdf6jvmnUSkeW5keuOXxwVjDYx2Rho9bq5WAl5c7W1X4e4YI
VbnnIvHcJh4jdu4L8XpkKEKyBxnbSL0uyzfnPi8/vITFHIE30TfaQSWREQm1kYXS
8Jl8ES/kHwtLV5+eNO+2ASRzwyPtMSDIUs29eU7bagO55O4gDNSz31u0GTghmFZ7
@jaggedsoft
jaggedsoft / composer.json
Created November 1, 2015 18:15 — forked from 256cats/composer.json
Web scraping ReactPHP Curl Proxies, curl multi example, scraping news ycombinator, explanation here: http://256cats.com/fast-scraping-with-reactphp-curl-proxies/
{
"require": {
"khr/react-curl": "~2.0",
"sunra/php-simple-html-dom-parser": "~1.5"
}
}
from scrapy.spider import Spider
from scrapy.selector import Selector
from yp.items import YpItem
class YpSpider(Spider):
name = "yp"
allowed_domains = ["yellowpages.com"]
start_urls = [
"http://www.yellowpages.com/ft-worth-tx/churches?g=ft.%20worth%2C%20tx&q=churches"
]
@jaggedsoft
jaggedsoft / keybase.md
Created February 8, 2015 06:07
keybase proof

Keybase proof

I hereby claim:

  • I am jaggedsoft on github.
  • I am jaggedsoft (https://keybase.io/jaggedsoft) on keybase.
  • I have a public key whose fingerprint is 7475 B0CD E402 21E5 9182 71BE 7522 1E31 D589 7009

To claim this, I am signing this object:

// Scraping Made Easy with jQuery and SelectorGadget
// (http://blog.dtrejo.com/scraping-made-easy-with-jquery-and-selectorga)
// by David Trejo
//
// Install node.js and npm:
// http://joyeur.com/2010/12/10/installing-node-and-npm/
// Then run
// npm install jsdom jquery http-agent
// node numresults.js
//
function shuffleArray(array) {
for (var i = array.length - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
var temp = array[i];
array[i] = array[j];
array[j] = temp;
}
return array;
var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update });
function preload() {
game.load.image('ball', 'assets/sprites/shinyball.png');
}
var sprite;
# So, this is pretty horrible. If we just encode using btoa, any UTF-8 chars cause an error.
# If we use either of the workarounds on MDN[1], the £ sign is encoded wrong. I suspect
# Excel totally sucking at encodings is the reason why. So, the workaround is, to use
# the MDN workaround on chars with values > 255, and allow chars 0-255 to be encoded
# as is with btoa. Note that if you use either of the workarounds on MDN, chars
# 128-255 will be encoded as UTF-8, which includeds the £ sign. This will cause excel
# to choke on these chars. Excel will still choke on chars > 255, but at least the £
# sign works now...
# [1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Base64_encoding_and_decoding