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
# 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
// 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
@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
// 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.

pragma solidity ^0.6.0;
import "./token.sol";
contract ERC20Manager {
address payable seller;
uint public price = 1 ether;
ET tokenContract;
constructor() public
@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"
},

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