Skip to content

Instantly share code, notes, and snippets.

View you21979's full-sized avatar
💭
I may be slow to respond.

Yuki Akiyama you21979

💭
I may be slow to respond.
View GitHub Profile
@you21979
you21979 / 充電アダプター.md
Last active September 12, 2017 11:42
aliexpressなどで売ってる充電器。
QC3 PE2.0+ USBPD CABLE NOTE
Meizu UP0830 ○     ☓   TypeA usb-cのモバイルバッテリに5V3Aで充電できた
Xiaomi CDQ02ZM TypeC
Sony UCH12   ○     ☓   TypeA Blackviewの端末ではPE2で充電できなかった
Mackertop45WPD TypeC
function prepareFee(): Promise<Object> {
const multiplier = instructions.signersCount === undefined ? 1 :
instructions.signersCount + 1
if (instructions.fee !== undefined) {
txJSON.Fee = scaleValue(common.xrpToDrops(instructions.fee), multiplier)
return Promise.resolve(txJSON)
}
const cushion = api._feeCushion
return common.serverInfo.getFee(api.connection, cushion).then(fee => {
return api.connection.getFeeRef().then(feeRef => {

Keybase proof

I hereby claim:

  • I am you21979 on github.
  • I am you21979 (https://keybase.io/you21979) on keybase.
  • I have a public key ASC3GWEYISkCprbiw64dxyT_FTwKXtRglfDqdm6g-ke1QAo

To claim this, I am signing this object:

一日分の高値と安値を取得
その間をトラリピ
const net = require('net');
const responseParser = require('http-string-parser').parseResponse;
const makeCookieAuth = (user, password) => {
return new Buffer(user + ':' + password).toString('base64')
}
const makeRequest = (method, params, id) => {
return JSON.stringify({
jsonrpc : "2.0",
const fees = require('bitcoinfees-21co');
const task = require('promise-util-task');
const munin = require('munin-plugin');
const api = fees.FeesApi;
const graphRecommended = (res) => {
const g = new munin.Graph('bitcoin feerate','satoshi/byte','bitcoin');
Object.keys(res).forEach(key => {
g.add(new munin.Model.Default(key).setValue(res[key]));
})
@you21979
you21979 / a.md
Last active December 27, 2016 07:31
counterparty

https://www.youtube.com/watch?v=5yP7pvQynb4

  • bitcoinのトランザクションだけでデータを完結している
  • bitcoinのトランザクション内にカウンターパーティのデータを紛れ込ませる
  • 1of3のmultisig内に偽装してデータを埋め込む
  • トランザクションにはトークン名と残高を記録
  • counterpartydはビットコインのブロックチェーンをウォッチして独自データベースに集計する
@you21979
you21979 / hdnode.md
Last active June 25, 2018 04:36
bitcoinjs-lib hdnode snipet

mnemonic generate

12 word

const mnemonic = bip39.generateMnemonic();

24 word

@you21979
you21979 / testnet.js
Created November 10, 2016 13:46
coinomiウォレット救済ツール
const bitcoin = require("bitcoinjs-lib")
const bip39 = require('bip39')
const bip32utils = require('bip32-utils')
const insight = require('insight-cli').RestClient
const bip44_account = (m, BIP44) => m.deriveHardened(BIP44.PURPOSE).deriveHardened(BIP44.COINTYPE).deriveHardened(BIP44.ACCOUNT)
const mnemonic = ""
const seed = bip39.mnemonicToSeed(mnemonic, "")
@you21979
you21979 / gist:7324028b48b833dd7ac97e56532ddf6f
Last active October 28, 2016 07:23
2017年勉強したいリスト
* interledger
* lightning
* ipfs
* iota