Skip to content

Instantly share code, notes, and snippets.

@chiptus
chiptus / gist:0f78f21b67310f022d98e7bcb28c1d5c
Created July 13, 2017 13:30
Error message when trying to send invoice
Traceback (most recent call last):
File "/opt/google_appengine/google/appengine/runtime/wsgi.py", line 267, in Handle
result = handler(dict(self._environ), self._StartResponse)
File "/home/chaim/repos/coligu/coligu-web/lib/flask/app.py", line 1994, in __call__
return self.wsgi_app(environ, start_response)
File "/home/chaim/repos/coligu/coligu-web/lib/flask/app.py", line 1985, in wsgi_app
response = self.handle_exception(e)
File "/home/chaim/repos/coligu/coligu-web/lib/flask/app.py", line 1540, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/chaim/repos/coligu/coligu-web/lib/flask/app.py", line 1982, in wsgi_app
@chiptus
chiptus / page-wrapper.js
Last active June 7, 2018 10:02
A react-router wrapper that will encapsulate the use of the router for the page
import React, { Fragment } from 'react';
import { BrowserRouter, Route, Redirect } from 'react-router-dom';
// this is the actual code snippet, everything afterwards is used for example
export function pageWrapper(Component) {
// can use a stateless function component, but this is easier to extend and add prop types
return class PageWrapper extends React.Component {
render() {
const {
history: { push },
#!/bin/bash
# TODO
# 1. Add vpn option (to Wants and After)
# openvpn-client@<vpnprovider>.service
NODE_SERVICE_FILE=/etc/systemd/system/tezos-node.service
BAKER_SERVICE_FILE=/etc/systemd/system/tezos-baker.service
ACCUSER_SERVICE_FILE=/etc/systemd/system/tezos-accuser.service
import { useState } from 'react';
import { Tezos } from '@taquito/taquito';
import { BeaconWallet } from '@taquito/beacon-wallet';
export function useWallet() {
const [initialized, setInit] = useState(false);
const [address, setAddress] = useState('');
const [error, setError] = useState('');
const [loading, setLoading] = useState(false);
import {useState} from 'react'
export function useBalanceState(address = '') {
const [balance, setBalance] = useState(0);
const [error, setError] = useState('');
const [loading, setLoading] = useState(false);
...
return {balance, error, loading};
const { mnemonic, secret, password, email } = require('./faucet.json');
module.exports = {
networks: {
development: {
host: 'https://carthagenet.smartpy.io',
port: 443,
network_id: '*',
secret,
mnemonic,