Das isch Züri

Das muss man über Züri einfach wissen, no excuse
– So werden in der Schweiz Freunde gemacht, gilt auch für Züri: https://www.swissinfo.ch/eng/multimedia/an-animated-guide_how-to-make-friends-with-a-swiss-person-/43930494
tagesanzeiger.ch musst Du einfach gelesen haben, sonst weisst Du nicht was hier läuft, sorry.

Das muss man in Züri (mindestens) einmal gemacht haben (vielleicht):

Ab in die Berge…
– Wanderungen ab Zürich: https://www.wanderungen.ch/

create ethereum keystore from private key

I havent yet found a python way of doing this but here is an npm solution:


npm install ethereumjs-wallet


var Wallet = require('ethereumjs-wallet');
var key = Buffer.from('<private key>', 'hex');
var wallet = Wallet.fromPrivateKey(key);
wallet.toV3String('<empty string or password');

Derive bitcoin addresses from HD xpub keys


we want to

  • generate Bitcoin receiving addresses from an xpub key (so that no secret information needs to be shared)
  • do this independently from a service / API, in python
  • be compatible with https://iancoleman.io/bip39/
  • be compatible with wallet software such as Electrum or blockchain.info so that the received funds can be easily managed

A note in regards to blockchain.info:

  • blockchain.info allows to export the mnemonic and also the xpub key for each wallet account created
  • the xprv key for each account can be derived via https://iancoleman.io/bip39/ by setting the account to {n}, where 0 corresponds to the first blockchain.info account, 1 to the second, and so on.
  • this xprv can then be imported into Electrum


https://github.com/primal100/pybitcointools/ appears to be the continuation of Vitalik Buterin’s abandoned https://github.com/vbuterin/pybitcointools.


from cryptos import *

words = 'word1 word2 word3 word4 word5 word6 word7 word8 word9 word10 word11 word12'
coin = Bitcoin()
private_wallet = coin.wallet(words)

xpub = private_wallet.keystore.xpub

# this is where you would start with an address calculation feature in an insecure environment like a web server
pub_keystore = keystore.from_xpub(xpub, coin, "p2pkh")
pub_wallet = wallet.HDWallet(pub_keystore)

Divio/DjangoCMS – import a DB dump

This is based on http://support.divio.com/local-development/divio-shell/how-to-interact-with-your-local-projects-database

First, get rid of the old db:

docker ps
docker stop projectname_db_1
docker rm projectname_db_1
docker-compose up db

then import

cat db-dump.sql | docker exec -i projectname_db_1 psql -U postgres db

Simple Django Admin Bulk Editing

Django Admin is awesome but it lacks an important feature: Editing multiple items in batch. There are two django add-ons this functionality but both seem a bit out of date.

Here I would like to show an example of how simple batch editing can be added to django admin with minimal amount of code, taking advantage of django admin’s own get_form().

# admin.py
def batch_update_view(model_admin, request, queryset, field_name):

        # removes all other fields from the django admin form for a model
    def remove_fields(form):
        for field in list(form.base_fields.keys()):
            if not field == field_name:
                del form.base_fields[field]
        return form

        # the return value is the form class, not the form class instance
    form_class = remove_fields(model_admin.get_form(request))

    if request.method == 'POST':
        form = form_class()

        # the view is already called via POST from the django admin changelist
        # here we have to distinguish between just showing the intermediary view via post
        # and actually confirming the bulk edits
        # for this there is a hidden field 'form-post' in the html template
        if 'form-post' in request.POST:
            form = form_class(request.POST)
            if form.is_valid():
                for item in queryset.all():
                    setattr(item, field_name, form.cleaned_data[field_name])
                model_admin.message_user(request, "Changed offer on {} items".format(queryset.count()))
                return HttpResponseRedirect(request.get_full_path())

        return render(
                'form': form,
                'items': queryset,
                'media': model_admin.media,

The template for the intermediary view could be made model agnostic by passing a list of (id, string) tuples to the template instead of item objects:


{% extends "admin/base_site.html" %}

{% block extrahead %}{{ block.super }}
    <script type="text/javascript" src="{% url 'admin:jsi18n' %}"></script>
    {{ media }}
{% endblock %}

{% block content %}
    <form action="" method="post">
        {% csrf_token %}
            {{ form }}
            {% for item in items %}
                    {{ item.id }} - {{ item.date }} - {{ item.who }} - {{ item.offer }} - {{ item.offer_work_type }}
                {# this is required by Django Admin custom action framework #}
                <input type="hidden" name="_selected_action" value="{{ item.pk }}"/>
            {% endfor %}
                {# this is required by Django Admin custom action framework #}
        <input type="hidden" name="action" value="{{ request.POST.action }}"/>
        <input type="hidden" name="form-post" value="True"/>
        <input type="submit" name="apply" value="Save"/>
{% endblock %}
class YourModelAdmin(admin.ModelAdmin):
    actions = [

    def custom_batch_editing_field1_admin_action(self, request, queryset):
        return batch_update_view(
            # this is the name of the field on the YourModel model
    batch_update_offer.short_description = "batch update field1"

Website Launch und Relaunch – Diese Skills müssen Sie an Bord holen

  • Branding: Der Branding Experte stellt sicher, dass die Alleinstellungsmerkmale und die Marke visuell und inhaltlich klar und prägnant sind.
  • Creative Design: Der Designer stellt sicher, dass die Webseite optisch ansprechend daherkommt.
  • UX (User Experience): Der UX Experte stellt sicher, dass sich der User intuitiv zurecht findet auf der Webseite.
  • Kommunikation / PR / Text: Der Texter stellt sicher, dass die Texte einfach lesbar und interessant sind.
  • Fotografie: Stellt sicher, dass die verwendeten Fotos authentisch und ansprechend sind. Produziert eigene Fotos, falls nötig.
  • Frontend Development: Setzt die Anleitungen von UX und Creative Design um und optimiert das User Interface für geläufige Browser und Geräte (responsive web design).
  • Online Marketing: Stellt sicher, dass für Marketing und Business verwertbare User Interaktionen (z.B. Warenkorb oder Kontaktformular) vorhanden sind und der Weg des Users da hin klar und einfach gestaltet ist.
  • Backend / CMS Engineering: Stellt sicher, dass Inhalte erstellt, editiert und verknüpft werden können.

What types of token sale projects are there?

There are 3 common types of projects we currently see happening in the crypto-world, particularly when it comes to token sales (a.k.a. ICO):

Non-profit Infrastructure Projects

These are projects that create general crypto infrastructure and services. Examples: bancor, aeternety, tezos, taas. They (in theory) help to make crypto currencies as a whole more efficient and more useful. They are well-funded because every potential user is an investor and vice versa. This means that 100% of potential investors have an incentive to invest as all of them are crypto-currency holders and as such have an incentive to use the service or infrastructure at a later point of time. Virtually all of these projects create their own implementation of the blockchain concept as their underlying business logic requires further development and/or extension of the blockchain concept as we currently know it. These projects are by definition non-profit projects and as such there are no legal risks or challenges. Swiss legal entities such as foundations (originally meant for charitable purposes) have quickly become the legal solution of choise for these types of projects. Investors still have a huge incentive to invest as the tokens they receive are likely to increase in value due to the future demand of the underlying business value of the new (and unique) protocol features.

For-profit Blockchain Projects

These are projects that use blockchain technology in the fields of traditional (non-crypto) business. Examples: po.et. These projects take traditional business logic and want to use the benefits of decentralisation that is provided by blockchain technology to get a competitive advantage over current implementations of that business logic. In theory most of them should not implement their own blockchain infrastructure and instead be able to implement their business logic on existing blockchains and services (such as the Ethereum blockchain). For example a market place business logic is 100% implementable on the Ethereum platform. These projects are likely to be less well-funded because their tokens and services are not likely to achieve such a complete crypto-market penetration as this should be the case for crypto-infrastructure projects. In the example of po.et there will be demand for the po.et token for people that need to protect Intellectual Property (IP) only. These people make up for only a tiny share of current crypto-holders. The advantage of these projects is that they have the potential to disrupt huge markets and acquire new users out of these traditional markets on both offer and demand side and onboard them onto the crypto infrastructure. For crypto-holders these projects are still interesting for investment in the long run, however it is less likely that these tokens will increase in value in the short term as demand for these projects will go up as slowly as the transition of the underlying markets from non-crypto to crypto, which it is safe to assume will take decades. These projects are mostly for-profit as its founders in many cases want to run the for-profit business themselves instead of just providing non-profit infrastructure (like a market place), which creates legal risks and hurdles (compliance with regulators and jurisdictions, obtaining permits).

Investment Blockchain Projects

These are projects that let users invest in non-crypto assets. Examples: brickblock.io, vaultoro. These projects are also implementable on existing blockchains such as Ethereum. These are 100% for-profit businesses. As the token they sell is considered to be a security by all of earth’s main jurisdictions they are subject to regulation and banking and finance laws, as well as collective investment laws. This means that these type of crypto projects need to obtain a banking license, conduct KYC and AML procedures on investors, amongst other legal requirements. The legal challenges for asset classes such as commodities (gold, etc.) is much simpler solved than for asset classes that return a dividend. Investors are extremely likely to fund this type of projects because it allows them to diversify their crypto-currency to real-world asset classes and return on investment is much more short-term (and likely to happen at all).

ethereum bits & blocks


Oracles are gateways from the blockchain to non-blockchain information and services and vice versa



  • Ethereum Wallet and geth can both access the same network info and keystore (account).
  • Info is stored on Mac OS X in ~/Library/Ethereum/<network>/

Proof of Concepts

  • Sign up with an ethereum address to an off-chain backend. The off-chain backend needs to securely be able to challenge and verify address ownership.
  • Then connect it to a password or email address