Skip to content

Instantly share code, notes, and snippets.


Chaim Lev-Ari chiptus

View GitHub Profile
View truffle-config.js
const { mnemonic, secret, password, email } = require('./faucet.json');
module.exports = {
networks: {
development: {
host: '',
port: 443,
network_id: '*',
View use-balance-state.js v1
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};
View use-wallet.js
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);
# 1. Add vpn option (to Wants and After)
# openvpn-client@<vpnprovider>.service
chiptus / page-wrapper.js
Last active Jun 7, 2018
A react-router wrapper that will encapsulate the use of the router for the page
View page-wrapper.js
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 },
chiptus / gist:0f78f21b67310f022d98e7bcb28c1d5c
Created Jul 13, 2017
Error message when trying to send invoice
View gist:0f78f21b67310f022d98e7bcb28c1d5c
Traceback (most recent call last):
File "/opt/google_appengine/google/appengine/runtime/", line 267, in Handle
result = handler(dict(self._environ), self._StartResponse)
File "/home/chaim/repos/coligu/coligu-web/lib/flask/", line 1994, in __call__
return self.wsgi_app(environ, start_response)
File "/home/chaim/repos/coligu/coligu-web/lib/flask/", line 1985, in wsgi_app
response = self.handle_exception(e)
File "/home/chaim/repos/coligu/coligu-web/lib/flask/", line 1540, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/chaim/repos/coligu/coligu-web/lib/flask/", line 1982, in wsgi_app
You can’t perform that action at this time.