Skip to content

Instantly share code, notes, and snippets.

View alexanderbez's full-sized avatar
🚀
Building the Cosmos

Aleksandr Bezobchuk alexanderbez

🚀
Building the Cosmos
View GitHub Profile

Keybase proof

I hereby claim:

  • I am alexanderbez on github.
  • I am aleksbez (https://keybase.io/aleksbez) on keybase.
  • I have a public key whose fingerprint is BC91 C76C 50A7 A083 C8AB 3B44 9CC9 3A84 72B9 E025

To claim this, I am signing this object:

#!/usr/bin/env zsh
# ------------------------------------------------------------------------------
#
# Modified version of "Pure" - A minimal and beautiful theme for oh-my-zsh
#
#
# Based on the custom Zsh-prompt of the same name by Sindre Sorhus. A huge
# thanks goes out to him for designing the fantastic Pure prompt in the first
# place! I'd also like to thank Julien Nicoulaud for his "nicoulaj" theme from
@alexanderbez
alexanderbez / ethminer.service
Last active August 10, 2018 23:23
A simple systemd service definition for Ethminer.
[Unit]
Description=Ethereum mining service
Requires=multi-user.target
After=multi-user.target
[Service]
User=aleks
Type=simple
WorkingDirectory=$HOME/miners/ethminer
EnvironmentFile=$HOME/miners/ethminer/env
{
"workbench.iconTheme": "eq-material-theme-icons",
"editor.minimap.enabled": false,
"workbench.colorTheme": "One Dark Pro Vivid",
"materialTheme.fixIconsRunning": false,
"editor.rulers": [
80,
120
],
"workbench.colorCustomizations": {
@alexanderbez
alexanderbez / .zshrc
Created August 20, 2018 14:04
ZSH configuration
# Path to your oh-my-zsh installation.
export ZSH="/Users/aleksbez/.oh-my-zsh"
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="bureau"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
@alexanderbez
alexanderbez / badger_wrapper.go
Last active January 22, 2023 21:03
An example wrapper around BadgerDB providing a simple embedded key/value store interface.
import (
"context"
"fmt"
"os"
"time"
"github.com/dgraph-io/badger"
)
const (
@alexanderbez
alexanderbez / purge_github_branches.sh
Created September 10, 2018 21:20
A shell function to purge all local git branches that do not exist on remote.
func purgeLocalGitBranches() {
red='\033[0;31m'
echo "${red}Purging local branches no longer found on remote..."
git fetch -p && for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done
}
@alexanderbez
alexanderbez / limited_multisend.go
Last active December 18, 2022 20:32
A limited multisend tx command in the Cosmos SDK for the Gaia network.
package cli
import (
"fmt"
"github.com/spf13/cobra"
bankfork "github.com/cosmos/cosmos-sdk/cmd/gaia/app/x/bank"
"github.com/cosmos/cosmos-sdk/client"
@alexanderbez
alexanderbez / gaia_upgrade_instructions.md
Last active June 8, 2019 12:29
Gaia network upgrade (cosmoshub-1 => cosmoshub-2)

Gaia v0.34.0 Upgrade Instructions

The following document describes the necessary steps involved that a full node must take in order to upgrade from cosmoshub-1 to cosmoshub-2.

Preliminary

Given the acceptance of the transfers enablement proposal which encompasses the v0.34.0 release of the SDK, the Cosmos network, cosmoshub-1, will halt at block TODO and will upgrade to cosmoshub-2 using the v0.34.0 (0f7877c2) release

@alexanderbez
alexanderbez / gaia_v1_rc_migration.sh
Last active August 7, 2019 18:36
Gaia v1.0.0-rc1 to rc3 custom migration script
#!/bin/bash
#
# Example:
# sh ./gaia_v1_rc_migration.sh ./old_genesis.json ./new_genesis.json
INPUT_GENESIS=$1
OUTPUT_GENESIS=$2
if [ -z "$INPUT_GENESIS" ]; then
echo "no input genesis provided"