Skip to content

Instantly share code, notes, and snippets.

View 0mkara's full-sized avatar
:octocat:
Go to shell!

Omkara 0mkara

:octocat:
Go to shell!
View GitHub Profile
@0mkara
0mkara / Ethereum_private_network.md
Last active April 19, 2024 00:09
Ethereum private network configuration guide.

Create your own Ethereum private network

Introduction

Used nodes:

Linux raspberrypi 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l GNU/Linux
Linux localhost.localdomain 4.14.5-200.fc26.x86_64 #1 SMP Mon Dec 11 16:29:08 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

ethcode-opt

Smart Contracts development on Ethcode

Usage instructions

Activate plugin with activation command

  • Command: ethcode.activate
  • Description: Activates Ethcode extension.

Screenshot from 2019-09-28 23-04-40

@0mkara
0mkara / erc-721-example.sol
Last active October 8, 2020 08:10
erc-721 compiled with 0.6.12+commit.27d51765.Emscripten.clang
This file has been truncated, but you can view the full file.
{
"contracts": {
"/home/0mkar/Karma/solidity-examples/erc/erc_721_exmpl.sol": {
"ERC721BidSale": {
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
pragma solidity ^0.6.0;
import "./token.sol";
contract ERC20Manager {
address payable seller;
uint public price = 1 ether;
ET tokenContract;
constructor() public
// SPDX-License-Identifier: MIT
// wETHC token
// This is an ERC-20 token following OpenZepplin guidelines
// This token also wraps around some ether
pragma solidity ^0.6.0;
import "./contracts/token/ERC20/ERC20.sol";
contract F7 is ERC20 {
constructor() ERC20("Ethcode", "ETHC") public {
@0mkara
0mkara / EtherscannerPolicy.md
Last active April 20, 2020 05:35
Etherscanner privacy policy

Privacy Policy

Math & Cody built the Etherscanner app as a Free to use app. This SERVICE is provided by Math & Cody at no cost and is intended for use as is.

This page is used to inform visitors regarding our policies with the collection, use, and disclosure of Personal Information if anyone decided to use our Service.

If you choose to use our Service, then you agree to the collection and use of information in relation to this policy. We do not collect any personal information. The Information that we collect is publically available and used for providing and improving the Service.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Etherscanner unless otherwise defined in this Privacy Policy.

@0mkara
0mkara / zfs.md
Last active April 16, 2020 03:35
Quick ZFS pool with new HGST 4 TB
  • List all disks
sudo fdisk -l
Disk /dev/sda: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
// solc-js-webworker.js
const solcjs = require('solc-js')

var lid = 0
var compiler

onmessage = async event => {
  const [lid, from, path, ref, type, body] = event.data
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@0mkara
0mkara / mortal.sol
Created January 22, 2019 17:12
Mortal library
pragma solidity ^0.5.0;
contract Mortal {
/* Define variable owner of the type address */
address payable owner;
/* This function is executed at initialization and sets the owner of the contract */
function mortal() public { owner = msg.sender; }
/* Function to recover the funds on the contract */