Skip to content

Instantly share code, notes, and snippets.

View dendisuhubdy's full-sized avatar
🚀
at the speed of light

Dendi Suhubdy dendisuhubdy

🚀
at the speed of light
View GitHub Profile
@iamdefinitelyahuman
iamdefinitelyahuman / conftest.py
Last active September 16, 2020 06:32
Brownie Pytest Example
import pytest
@pytest.fixture(scope="function", autouse=True)
def isolate(fn_isolation):
pass
@pytest.fixture(scope="module")
def token(Token, accounts):
t = accounts[0].deploy(Token, "Test Token", "TST", 18, "1000 ether")
yield t
@aquaductape
aquaductape / zshrc
Last active September 23, 2021 07:57 — forked from LukeSmithxyz/zshrc
# Luke's config for the Zoomer Shell
# Enable colors and change prompt:
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history
# Luke's config for the Zoomer Shell
# Enable colors and change prompt:
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history
@learner-long-life
learner-long-life / DecentWebWallets.md
Last active May 26, 2021 23:21
Ethereum / Decentralized Web Wallets, Desiderata and Tradeoffs

Decentralized Web Wallets

After reading about current options for secure browser storage for wallets, https://www.rdegges.com/2018/please-stop-using-local-storage/

I think I understand the tradeoffs of the different approaches, which is helping me write my own web wallet (called Democracy), currently for Ethereum.

I'd like to check my understanding here. Any feedback appreciated below in comments.

@BitProcessor
BitProcessor / k8s_delete_evicted_pods.sh
Last active June 9, 2020 05:06
K8S: Delete evicted pods
kubectl get pods --all-namespaces -o json | \
jq '.items[] | select(.status.reason!=null) | select(.status.reason | contains("Evicted")) | "kubectl delete pods \(.metadata.name) -n \(.metadata.namespace)"' | \
xargs -n 1 bash -c
[{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mint","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name"
@rjmacarthy
rjmacarthy / rename_js_files.sh
Created September 4, 2019 10:56 — forked from afternoon/rename_js_files.sh
Rename .js files to .ts
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \;
@nmarley
nmarley / README.md
Last active March 31, 2025 22:32
Go / C++ bindings example

Go / C++ bindings example

This is an example of Go code calling to a C++ library with a C wrapper.

Build

go build  # this only ensures it compiles
#include <array>
#include <type_traits>
#include <cstddef>
template <class ValueType, bool is_const>
class ContiguousContainerView {
using CQualValueType = std::conditional_t<is_const, const ValueType, ValueType>;
public:
using DerefT = CQualValueType&;
using PointerT = CQualValueType*;
@WiSaGaN
WiSaGaN / commands.md
Last active October 2, 2020 19:35
Useful shell commands