Skip to content

Instantly share code, notes, and snippets.

Timoschenko Viacheslau ch3ll0v3k

Block or report user

Report or block ch3ll0v3k

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View menu.jsx
import React, { Component } from "react";
import {
Text,
TouchableOpacity,
View,
Image,
ScrollView,
Button,
ImageBackground,
AppState,
View leaflet.tails-within.rect.js
function getTileUrls(bounds, tileLayer, zoom) {
var min = map.project(bounds.getNorthWest(), zoom).divideBy(256).floor(),
max = map.project(bounds.getSouthEast(), zoom).divideBy(256).floor(),
urls = [];
for (var i = min.x; i <= max.x; i++) {
for (var j = min.y; j <= max.y; j++) {
var coords = new L.Point(i, j);
coords.z = zoom;
urls.push(tileLayer.getTileUrl(coords));
View leaflet.tails-within.rect.js
function getTileUrls(bounds, tileLayer, zoom) {
var min = map.project(bounds.getNorthWest(), zoom).divideBy(256).floor(),
max = map.project(bounds.getSouthEast(), zoom).divideBy(256).floor(),
urls = [];
for (var i = min.x; i <= max.x; i++) {
for (var j = min.y; j <= max.y; j++) {
var coords = new L.Point(i, j);
coords.z = zoom;
urls.push(tileLayer.getTileUrl(coords));
View byte-color.to.heat-map.value.js
function getHSLColor( val ){
// normalize
val = (+val)>255?255:(+val)< 0?0:(+val);
// NON-STANDARD
// val = ((+val)-250) /285 - 320;
// h = (1 - (+val)) * 280;
// s = 100;
// l = (+val) * 50;
// l = 50;
View main.simple.2.py
# pip install pillow opencv-python opencv-contrib-python
import os
import sys
import cv2
from PIL import Image
from time import sleep
import urllib.request
import requests
View main.simple.py
# pip install pillow opencv-python opencv-contrib-python
import os
import sys
import cv2
from PIL import Image
video_name = 'myVideo.avi';
image_folder = './images'; # C:\\Python\\MyDirectory
fps = 10;
View nodejs.10+.RSA.js
const path = require('path');
const fs = require('fs');
const crypto = require('crypto');
const logger = require('mii-logger.js');
const RSA_BITS = 2048 * 2;
const LOCATION = __dirname+'/rsa_keys';
const SEC_KEY = 'sec_key.pem';
const PUB_KEY = 'pub_key.pem';
View test.js
CVTResMessage: function( inp ){
switch( inp ){
case 'address must be valid': return 'At least one address supplied in the request was invalid. Addresses are validated before processing a request. If validation fails, an error containing this message is returned. ';
case 'FAILURE_SERVER_LIMIT': return 'The number of accounts that are allowed to harvest on NIS was exceeded.';
case 'FAILURE_UNKNOWN_ACCOUNT': return 'The account specified in the request is not known.';
case 'FAILURE_PAST_DEADLINE': return 'The deadline for the entity has already expired. The deadline must always lie in the future.';
case 'FAILURE_FUTURE_DEADLINE': return 'The deadline lies too far in the future. Deadlines are only allowed to lie up to 24 hours in the future.';
case 'FAILURE_INSUFFICIENT_BALANCE': return 'The account does not have enough funds.';
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
{
You can’t perform that action at this time.