Skip to content

Instantly share code, notes, and snippets.

Avatar

Timoschenko Viacheslau ch3ll0v3k

View GitHub Profile
View base64-decode-and-post-as-multipart-form-data.js
const fs = require('fs');
const request = require('request');
const base64_data = '/9j/4AAQSkZJRgABAQAAAQABAAD/5wAJU2ltaWNvbv/bAEMANSUoLyghNS8rLzw5NT9QhVdQSUlQo3V7YYXBqsvIvqq6t9Xw///V4v/mt7r////////////O///////////////AAAsIAogC0AEBEQD/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/2gAIAQEAAD8Azqt2cKSpIX5IxinvAqugKAZNTvbRJxsWg2K4+6KGgiDKPKX3pr20YkACDBpXtFEigRrg0x7dFcqUFN8mP+4KBDHn7gp6QRlyPLBFPMEIPMX6Uhghz/qh+VHkRDrGKb5MRP8Aqxj6U4QQn+AUv2eHH3BTTBF8vyDrTTDFn7goMMX9wUnkx/3BTkgiIzsFP8iE/wDLMUv2eH/nmKa9vF0CAUw26D+AUeRH/cFK8EeRiMCm+THgfIKUQxZ+4KXyIi33BSeTHn7go8mL+4Kd5EW77gqQgDpRmlpCabTGOTilooopRTxRRSUUUq9acaSjNLmkzikJpKKWko5pV4NPz70hNJTaSiiiiiiiiiigU7NJSUUw0lFI33T9KoHrSVf0tQxkJ7Yqe9/1kR/2hVl4w55NObhetNAyKRlG8Mae/b61Vn/15+lRnrQOtSWxPnyAf3RVrJ25xzSOygZPamKPNwzDipFVSuMcUeWn90VFKFCA
@ch3ll0v3k
ch3ll0v3k / gist:0bb51f8f085255e35b8021831b43ab61
Created Mar 27, 2018 — forked from matthieu/gist:b07c5ba27bc99188a15f
Create and send a Bitcoin transaction using the BlockCypher Transaction API
View gist:0bb51f8f085255e35b8021831b43ab61
# In this example we're sending some test bitcoins from an address we control to a brand new test
# address. We'll be sending the coins using the following address, public and private keys (please
# don't abuse).
# address : mtWg6ccLiZWw2Et7E5UqmHsYgrAi5wqiov
# public : 03bb318b00de944086fad67ab78a832eb1bf26916053ecd3b14a3f48f9fbe0821f
# private : 1af97b1f428ac89b7d35323ea7a68aba8cad178a04eddbbf591f65671bae48a2
# 1. generate a one-shot dummy address we're going to send money to
$ curl -X POST http://api.blockcypher.com/v1/btc/test3/addrs
{
@ch3ll0v3k
ch3ll0v3k / sendRawTransaction.js
Created Mar 25, 2018 — forked from raineorshine/sendRawTransaction.js
Sends a raw transaction with web3 v1.0 and Infura
View sendRawTransaction.js
const Web3 = require('web3')
const Tx = require('ethereumjs-tx')
// connect to Infura node
const web3 = new Web3(new Web3.providers.HttpProvider('https://mainnet.infura.io/INFURA_KEY'))
// the address that will send the test transaction
const addressFrom = '0x1889EF49cDBaad420EB4D6f04066CA4093088Bbd'
const privKey = 'PRIVATE_KEY'
View TelBot.php
<?php
// json_decode('"\u2B07"'); // arrow-down
// json_decode('"\u2B06"'); // arrow-up
// json_decode('"\u1F4B2"'); // usd
// json_decode('"\u1F4CC"'); // push-pin
class TelBot{
private static $_token = '';
View database.json
This file has been truncated, but you can view the full file.
{
"CA11112": {
"compatible": "CHEVROLET, DAEWOO",
"id": 1660,
"descr": "Рычаг подвески",
"cat": "Подвеска"
},
"CA11111": {
"compatible": "CHEVROLET, DAEWOO, OPEL",
View telega.simple.bot.py
#!/usr/bin/python2
# -*- coding: utf-8 -*-
# REQUIREMENTS
# python-telegram-bot
# pyTelegramBotApi
# telegram
"""
pip2 install python-telegram-bot
View nem.test.js
function transferXem( _sec_key, to_address, amount, cb ){
console.log( TAG+' transferXem: TO: ', to_address, 'amount: ', amount );
try{
Trace( 'transferXem' );
// var endpoint = NEMSDK.model.objects.create("endpoint")("http://myNode", 7890);
var endpoint = NEMSDK.model.objects.create('endpoint')( NEMSDK.model.nodes.defaultMainnet, NEMSDK.model.nodes.defaultPort );
// var endpoint = NEMSDK.model.objects.create("endpoint")( NEMSDK.model.nodes.defaultTestnet, NEMSDK.model.nodes.defaultPort );
View bittrex.api.py
"""
See https://bittrex.com/Home/Api
"""
import time
import hmac
import hashlib
try:
from urllib import urlencode
from urlparse import urljoin
View telega.bot.py
#!/usr/bin/python2
# -*- coding: utf-8 -*-
# REQUIREMENTS
# python-telegram-bot
# pyTelegramBotApi
# telegram
"""
pip2 install python-telegram-bot
View ERC-20.list.json
[{
"address":"0x59416A25628A76b4730eC51486114c32E0B582A1",
"symbol":"☀️ PLASMA",
"decimal":6,
"type":"default"
},{
"address":"0xAf30D2a7E90d7DC361c8C4585e9BB7D2F6f15bc7",
"symbol":"1ST",
"decimal":18,
"type":"default"