Skip to content

Instantly share code, notes, and snippets.

View Warchant's full-sized avatar
🐻
Rust go brrr

Bohdan Warchant

🐻
Rust go brrr
View GitHub Profile
#!/usr/bin/env python3
import requests
from requests.auth import HTTPBasicAuth
import random
class BtcApi:
def __init__(self):
self.apiurl = 'http://127.0.0.1:12001'
self.user = 'user1'
#ifndef __SLICE__HPP__
#define __SLICE__HPP__
#include <cstddef>
#include <iterator>
#include <type_traits>
#include <vector>
/// Non-owning contiguous array. Similar to gsl::span. Essentially, just a pair
/// T* + size_t
{
"compilerOptions": {
/* Basic Options */
"incremental": true /* Enable incremental compilation */,
"target": "ESNEXT" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
// "lib": [], /* Specify library files to be included in the compilation. */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
@Warchant
Warchant / yield.hpp
Created May 18, 2019 19:17
boost 1.70 fibers asio
// Copyright Oliver Kowalke, Nat Goodspeed 2015.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_FIBERS_ASIO_DETAIL_YIELD_HPP
#define BOOST_FIBERS_ASIO_DETAIL_YIELD_HPP
#define BOOST_ASIO_NO_DEPRECATED

Steps:

1. Create empty prisma project
$ mkdir prisma
$ cd prisma
$ prisma init
# select new database, select postgres and generate flow client
$ ls                                                                                                                                              bogdan@Bogdans-MacBook-Pro
datamodel.prisma   docker-compose.yml generated          prisma.yml
CREATE OR REPLACE FUNCTION
get_detail_text_google(item_id integer)
RETURNS TEXT AS
$$
declare
_ret TEXT;
_art TEXT;
_brand TEXT;
_country TEXT;
_har TEXT;
package jp.co.soramitsu.iroha.testcontainers;
import iroha.protocol.TransactionOuterClass;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

useful only on local deployment

dnshost:

image: dvdarias/docker-hoster

volumes:

- /var/run/docker.sock:/tmp/docker.sock

- /etc/hosts:/tmp/hosts

networks:

- adminnet

Keybase proof

I hereby claim:

  • I am warchant on github.
  • I am warchant (https://keybase.io/warchant) on keybase.
  • I have a public key ASBAj-kT6q5IV52ZHpMWnPjOoq5RTC6_ETUmRvmTahbhQgo

To claim this, I am signing this object: