Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Go to shell!

Omkara 0mkara

:octocat:
Go to shell!
View GitHub Profile
@0mkara
0mkara / erc-721-example.sol
Last active Oct 8, 2020
erc-721 compiled with 0.6.12+commit.27d51765.Emscripten.clang
View erc-721-example.sol
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"
View tokenManager.sol
pragma solidity ^0.6.0;
import "./token.sol";
contract ERC20Manager {
address payable seller;
uint public price = 1 ether;
ET tokenContract;
constructor() public
@0mkara
0mkara / EtherscannerPolicy.md
Last active Apr 20, 2020
Etherscanner privacy policy
View EtherscannerPolicy.md

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.

View token.sol
// 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 / zfs.md
Last active Apr 16, 2020
Quick ZFS pool with new HGST 4 TB
View zfs.md
  • 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
View worker_example.md
// 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
View simple-https-server.py
# 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 Jan 22, 2019
Mortal library
View mortal.sol
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 */
View Greeter.sol
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 */
function kill() public { if (msg.sender == owner) selfdestruct(owner); }
@0mkara
0mkara / SimpleStorage.sol
Created Oct 29, 2018
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=false&gist=
View SimpleStorage.sol
pragma solidity ^0.4.7;
import "remix_tests.sol";
contract SimpleStorage {
uint public storedData;
function SimpleStorage() public {
storedData = 100;
}
function set(uint x) public {