Skip to content

Instantly share code, notes, and snippets.

@vikiival
vikiival / deno.jsonc
Created November 6, 2023 11:09
deno fast format
{
"fmt": {
"singleQuote": true,
"semiColons": false,
"include": ["src/*.ts"]
},
"lint": {
"rules": {
"exclude": ["no-explicit-any"]
@vikiival
vikiival / wizard_log.md
Last active December 17, 2021 21:39
viki_the_wizard

Wizard Log 17.12.2021

subup

  • V0: implementation of polkadot-launch into the substrate
  • V1: define just repositories which should be executed and then ... :O

porticulis

Original idea by @yangwao

@vikiival
vikiival / aframe.ts
Created November 16, 2021 15:02
Nuxt Aframe
import Vue from 'vue'
import 'aframe';
Vue.config.ignoredElements = [
'a-scene',
'a-assets',
'a-box',
'a-cylinder',
'a-text',
'a-sphere',
@vikiival
vikiival / contract.ts
Created August 5, 2021 11:08
Smart contracts for NFT in Polkadot ecosystem
@contract
export class ERC721 {
storage: ERC721Storage;
constructor() {
this.storage = new ERC721Storage();
}
@constructor
default(name: string = "", symbol: string = ""): void {
Objekt Aro Slad Med Bez Klas Tvrd Bel Bar1 Bar2 Bar3 Sup Str
B5 6.480 6.660 4.560 2.200 2.910 3.470 4.720 5.585 5.735 5.985 4.260 3.250
C4 5.750 6.090 3.810 2.320 4.030 3.770 4.170 5.730 5.745 5.325 3.820 3.380
B2 3.940 4.120 2.440 3.630 5.770 5.390 4.770 6.665 5.105 4.595 3.500 3.030
D5 6.600 6.120 4.440 1.930 3.310 4.460 4.860 5.160 5.740 6.565 2.120 3.940
D4 5.680 5.980 3.800 2.120 3.850 4.140 5.030 5.635 5.220 5.480 2.380 5.160
E2 4.740 4.660 2.880 2.940 5.650 5.770 5.310 5.940 5.270 5.890 1.750 3.640
B5 6.310 6.130 4.780 1.940 2.700 3.260 5.070 5.710 5.370 6.365 3.650 4.550
C5 6.200 6.020 4.650 1.780 3.120 3.740 5.250 5.655 5.475 5.960 2.510 3.800
C2 3.790 3.880 2.310 3.520 6.240 5.730 5.390 6.300 5.135 5.230 2.010 4.110
@vikiival
vikiival / Epoch.sol
Last active March 17, 2021 09:31
NFT crashcourse for FIIT STU
// SPDX-License-Identifier: MIT
// Author Viktor Valastin (github: @vikiival)
pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;
import 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.1.0/contracts/token/ERC721/ERC721.sol';
import 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.1.0/contracts/access/Ownable.sol';
import 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.1.0/contracts/utils/Counters.sol';
@vikiival
vikiival / fetch.sh
Last active February 3, 2021 11:38
Fetching RMRK
#!/bin/bash
i=5438000
while [ $i -le 6010749 ]
do
yarn fetch --ws 'wss://kusama-rpc.polkadot.io' --from $i --to $((i+999))
let "i+=1000"
done
@vikiival
vikiival / ksm.py
Created December 3, 2020 17:32
Price of Kusama (KSM) for last 30 days
from pycoingecko import CoinGeckoAPI
import datetime
from statistics import median, mean
cg = CoinGeckoAPI()
def main():
numdays = 30
base = datetime.datetime.today()
date_list = [base - datetime.timedelta(days=x) for x in range(numdays)]
fn_format = lambda x: x.strftime("%d-%m-%Y")
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew cask install iterm2
# update iterm2 settings -> colors, keep directory open new shell, keyboard shortcuts
brew install bash # latest version of bash
# set brew bash as default shell
brew cask install visual-studio-code
# update vscode settings
# install vscode extensions
alexcvzz.vscode-sqlite
andys8.jest-snippets
apollographql.vscode-apollo
austincummings.razor-plus
bobsparadox.seti-black
BriteSnow.vscode-toggle-quotes
christian-kohler.npm-intellisense
christian-kohler.path-intellisense
CoenraadS.bracket-pair-colorizer
dbaeumer.vscode-eslint