Skip to content

Instantly share code, notes, and snippets.

View anistark's full-sized avatar
💻
Open Innovation and Development

Ani anistark

💻
Open Innovation and Development
View GitHub Profile
@anistark
anistark / isc-evm-metamask.js
Created May 12, 2022 01:27
Js snippet to auto-add IOTA Smart Contracts Evm to Metamask
// This is an example to auto detect if the current chain is ISC EVM Testnet and if not, switch to it.
// If chain doesn't exist on Metamask yet, this script will also add it.
// A metamask pop-up will appear and you can approve after verifying the details.
// This config can be set for any EVM compatible chain as such.
const chainName = 'ISC Testnet'
const chainId = 1074 // ISC EVM
const rpcUrl = 'https://evm.wasp.sc.iota.org'
const blockExplorerUrl = 'https://explorer.wasp.sc.iota.org'
@anistark
anistark / Escrow-Smart-Contract
Last active March 28, 2018 08:53 — forked from ToJen/Escrow-Smart-Contract
Example of an escrow smart contract
// package.json
{
"dependencies": {
"web3": "0.20.0",
"solc": "^0.4.19"
}
}
//Create file Ecrow.sol and create 3 variables: a buyer, a seller, and an arbiter
contract Escrow {
@anistark
anistark / keybase.md
Created February 20, 2018 21:00
Keybase

Keybase proof

I hereby claim:

  • I am anistark on github.
  • I am anistark (https://keybase.io/anistark) on keybase.
  • I have a public key whose fingerprint is F52A 2B82 4FCF AF89 4919 969F 9815 4C1D F248 5F26

To claim this, I am signing this object:

@anistark
anistark / gh-pages-deploy.md
Created September 20, 2017 20:00 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@anistark
anistark / git_tagging.md
Created July 30, 2017 18:23
Git Tagging

Git Tagging

Annotated Tags

git tag -a v1.4 -m 'my version 1.4'

Lightweight Tags git tag v1.4-lw Tagging Later

@anistark
anistark / paper.md
Last active August 22, 2017 18:03
PAPER Outline

Abstract

Introduction

System Model

Service Properties

The Algorithm

@anistark
anistark / blind_auction.sol
Last active July 2, 2017 21:59
Solidity Contracts
pragma solidity ^0.4.11;
contract BlindAuction {
struct Bid {
bytes32 blindedBid;
uint deposit;
}
address public beneficiary;
uint public auctionStart;
@anistark
anistark / gulp_help.md
Created May 29, 2017 11:47
Using external config file

Using external config file

Beneficial because it's keeping tasks DRY and config.json can be used by another task runner, like grunt.

config.json
@anistark
anistark / meta-tags.md
Created March 21, 2017 20:33 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
def password_strength(password):
"""
Verify the strength of 'password'
Returns a dict indicating the wrong criteria
A password is considered strong if:
8 characters length or more
1 digit or more
1 symbol or more
1 uppercase letter or more
1 lowercase letter or more