Skip to content

Instantly share code, notes, and snippets.

View shanev's full-sized avatar
💭
#BUIDL

shane.stars shanev

💭
#BUIDL
View GitHub Profile
@shanev
shanev / icon_create.sh
Created April 21, 2017 16:56
Generate an iOS app icon with a gradient background using an input image
#!/bin/sh
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
FILE="$DIR/../Design/appicon-foreground.svg"
OUTPUT_LOCATION="$DIR/../iTunes"
# convert svg asset to png
convert -density 2000 -resize 1024x1024 -background none $FILE appicon-foreground.png

A Tale of Two Name Services

Problem

The name alice can exist on multiple chains, owned by different accounts.

For example, alice.stars can point to a stars address that is associated with a different key than alice.stars on ICNS.

Solution 1: Merge ICNS and Stargaze Names

params.trading_fee_percent = trading_fee_bps
.map(Decimal::percent)
.unwrap_or(params.trading_fee_percent);
params.ask_expiry = ask_expiry.unwrap_or(params.ask_expiry);
params.bid_expiry = bid_expiry.unwrap_or(params.bid_expiry);
/*
* Wraps a cw721 contract with helpers.
* Adapted from https://github.com/CosmWasm/cw-plus/blob/main/contracts/cw721-base/helpers.ts.
*/
import {
CosmWasmClient,
SigningCosmWasmClient,
} from '@cosmjs/cosmwasm-stargate';
import { coins } from '@cosmjs/stargate';
@shanev
shanev / gist:990140
Created May 25, 2011 01:24
Ramones cover band looking for a singer
lets do this..
@shanev
shanev / vim_cheat.md
Last active September 5, 2021 16:30
vim8 Cheat Sheet

VIM CHEAT SHEET

Navigation

Quit all :qa

Go to top of file :gg

Go to bottom of file Shift-g

@shanev
shanev / tmux_cheat.txt
Last active July 22, 2021 15:54
tmux cheat
# start
tmux
# should see green bar at bottom
tmux list-sessions
tmux attach -t0
# detach current session
# Ctrl + b, release, then d
" execute pathogen#infect()
syntax on
filetype plugin indent on
:imap jj <Esc>
" old tab settings...
" show existing tab with 4 spaces width
" set tabstop=4
" when indenting with '>', use 4 spaces width
{
"assets": [
{
"id": 16235724,
"token_id": "369690035",
"num_sales": 0,
"background_color": null,
"image_url": "https://storage.opensea.io/files/13feb7324c6162c6857e212efeb67dd0.svg",
"image_preview_url": "https://storage.opensea.io/files/13feb7324c6162c6857e212efeb67dd0.svg",
"image_thumbnail_url": "https://storage.opensea.io/files/13feb7324c6162c6857e212efeb67dd0.svg",
{
"app_hash": "",
"app_state": {
"auth": {
"accounts": [
{
"@type": "/cosmos.auth.v1beta1.ModuleAccount",
"base_account": {
"account_number": "7",
"address": "stb1yl6hdjhmkf37639730gffanpzndzdpmhv50wq7",