Skip to content

Instantly share code, notes, and snippets.

View xeroc's full-sized avatar
🏠
building

Fabian Schuh xeroc

🏠
building
View GitHub Profile
job "bash" {
type = "service"
datacenters = ["de1"]
group "bash" {
count = 1
network {
mode = "bridge"
}
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
Spec: 0010
Title: Single-SignOn Onboarding
Authors: Fabian Schuh <fabian@blockops.de>
Status: Draft
Type: off-chain
Created: 2021-03-01

Abstract

In these days, internet users have a number of accounts they have to manage

from getpass import getpass
from pprint import pprint
from bitshares import BitShares
from bitshares.account import Account
from bitshares.amount import Amount
from bitsharesbase import operations
bitshares = BitShares("wss://eu.nodes.bitshares.ws")
bitshares.wallet.unlock(getpass())
ops = list()
if not self.worker.blockchain.nobroadcast:
# We using blocking so after this call we can be sure the operation
# is on the blockchain. However, a transfer does not return a
# resulting operation id as no object is created, thus we go thru
# the history and obtain the most recent operation id
# FIXME: potentially, this could go wrong in case some other entity
# has access ot the accounting account too and leverages that at the
# very same time. The ids would still be close to each other
account = Account(self.accounting_account)
statistics = Object(account["statistics"])
diff --git a/Dockerfile b/Dockerfile
index 618ff161..78d69a1d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -17,9 +17,8 @@ RUN \
libncurses-dev \
doxygen \
ca-certificates \
+ fish \
&& \
@xeroc
xeroc / dict_merge.py
Created August 21, 2019 10:06 — forked from angstwad/dict_merge.py
Recursive dictionary merge in Python
# Recursive dictionary merge
# Copyright (C) 2016 Paul Durivage <pauldurivage+github@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
---
- name: create pybitshares wallet
become_user: "{{bitshareseurope_pywallet_user}}"
become: yes
command: "{{bitshareseurope_pywallet_install_dir}}/env/bin/uptick createwallet --password '{{bitshareseurope_pywallet_passphrase | trim }}'"
args:
creates: "{{pybitshares_home}}/bitshares.sqlite"
- name: Set default node
become_user: "{{bitshareseurope_pywallet_user}}"
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/xeroc/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes