Skip to content

Instantly share code, notes, and snippets.

View treethought's full-sized avatar
💃

treethought treethought

💃
View GitHub Profile
@raineorshine
raineorshine / solidity-resources-and-tools.md
Created July 27, 2016 14:33
Solidity Resources & Tools

Best practices and tools are a bit scattered, and of course very much a work in progress since the community is still developing. You may be disappointed to find that there is not a cohesive, centralized set of best practices and workflow. My personal opinion is that truffle offers one of the most cohesive development experiences today, although over time you will likely find yourself doing most of your work one level of abstraction down: at the web3 layer. Here are some resources and tools that I have found useful.

Resources

Frameworks

@RussellLuo
RussellLuo / grpc_pi.py
Last active April 15, 2020 10:35
gRPC client interface for Python: generation script and mocking class.
# -*- coding=utf-8 -*-
"""Generate a pythonic interface based on the code generated by `grpcio-tools`.
Example:
$ python grpc_pi.py --proto-package-name='xx' --pb2-module-name='python.path.xx_pb2'
"""
import argparse
import itertools
@furui
furui / ExtendedChips.vue
Created March 18, 2017 10:10
Auto-completing Chips for Quasar
<template>
<div
class="q-chips group textfield"
@click="focus"
:class="{active: active, disabled: disable, readonly: readonly}"
>
<span
class="chip label bg-light text-grey-9"
v-for="(label, index) in value"
:key="index"
@savasadar
savasadar / BCAddressField.py
Last active February 20, 2019 14:17
Python code for validating bitcoin address
#
# DJango field type for a Bitcoin Address
#
import re
from django import forms
from django.forms.util import ValidationError
from Crypto.Hash import SHA256
class BCAddressField(forms.CharField):
default_error_messages = {
@mxactvtd
mxactvtd / TidalCyclesQuickReferenceStub.tidal
Last active November 30, 2025 14:22
TidalCycles Quick Reference compiled and partially rewritten documentation from various sources
---- TidalCycles QUICK REFERENCE ----
----------------------------------------------------------------
-- To use in your editor after or alongside your code for quick reference
-- Work in progress, mostly to be used as basis for further documnentation work, sorry for the errors and omissions
-- designed with atom - monokai one dark vivid as theme
-- https://gist.github.com/mxactvtd/bf3fb357a419c7f063b98dfd9a66cf78 - check for update, I keep updating this quite often atm
----------------------------------------------------------------
-- Some sources of Documentation --
-- https://tidalcycles.org/patterns.html
-- https://tidalcycles.org/functions.html
# Use Google Cloud Platform stackdriver with python structlog
from google.cloud.logging import Client
from google.cloud.logging import _helpers
from google.cloud.logging.handlers import CloudLoggingHandler
from google.cloud.logging.handlers.transports.background_thread import _Worker
# pip install python-json-logger
from pythonjsonlogger import jsonlogger
@crazygit
crazygit / parseTransaction.go
Last active April 6, 2025 08:22
Parse Ethereum Transaction, Decode input data, Decode output data
package main
import (
"context"
"encoding/hex"
"fmt"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethclient"
@munshkr
munshkr / App.jsx
Last active December 28, 2024 16:42
Hydra Synth hook for React
import { useHydra } from './useHydra'
import { useEffect } from 'react'
function App() {
const [canvasRef, hydraLoaded] = useHydra()
useEffect(() => {
if (!hydraLoaded) return;
// when it's loaded, run this script: