Skip to content

Instantly share code, notes, and snippets.

// http://codepen.io/nepalbitcoin/pen/GWxbwR
// var XX = new NeNum();
// console.log(XX.convert("123123.123123"));
var NeNum = function(num) {
var placing = ['', 'सय', 'हजार', 'लाख', 'करोड', 'अर्ब', 'खर्ब', 'निल', 'पद्म', 'संख्य'];
var values = ['', 'एक', 'दुई', 'तीन', 'चार', 'पाँच', 'छ', 'सात', 'आठ', 'नौँ', 'दश', 'एघार', 'बाह्र', 'तेह्र', 'चौध', 'पन्ध्र', 'सोह्र', 'सत्र', 'अठार', 'उन्नाइस', 'बीस', 'एक्काइस', 'बाइस', 'तेईस', 'चौबीस', 'पच्चिस', 'छब्बिस', 'सत्ताइस', 'अठ्ठाइस', 'उन्नतीस', 'तीस', 'एकतीस', 'बत्तीस', 'तेत्तिस', 'चौतीस', 'पैँतीस', 'छत्तिस', 'सैँतीस', 'अठतीस', 'उन्नचालीस', 'चालीस', 'एकचालीस', 'बयालीस', 'त्रिचालिस', 'चौवालीस', 'पैँतालीस', 'छयालीस', 'सतचालिस', 'अठचालीस', 'उन्नपचास', 'पचास', 'एकाउन्न', 'बाउन्न', 'त्रिपन्न', 'चौवन्न', 'पचपन्न', 'छपन्न', 'सन्ताउन्न', 'अन्ठाउन्न', 'उन्नसाठी', 'साठी', 'एकसठ्ठी', 'बैसठ्ठी', 'त्रिसठ्ठी', 'चौसठ्ठी', 'पैसठ्ठी', 'छैसठ्ठी', 'सतसठ्ठी', 'अठसठ्ठी', 'उनान्सत्तरी', 'सत्तरी', 'एकहत्तर', 'बहत्तर', 'तिरहत्तर', 'चौरहत्तर', 'पचहत्तर', 'छहत्तर', 'सतहत्तर', 'अठहत्तर', 'उ
@nepalbitcoin
nepalbitcoin / BikramSamvat.sol
Created June 13, 2017 12:20
Unix timestamp to Nepali DateTime.
pragma solidity ^0.4.11;
contract BikramSamvat{
/*
* Unix timestamp to Bikram Samvat (Date Time Library)
* @NepalBitcoin
*/
address public Bikram;
struct MITI {
@nepalbitcoin
nepalbitcoin / TweetRegistry.sol
Created June 30, 2017 06:13 — forked from anonymous/TweetRegistry.sol
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.11+commit.68ef5810.js&optimize=undefined&gist=
pragma solidity ^0.4.9;
/*
decentralized microblogging
Copyright (C) 2015 Jahn Bertsch
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation in version 3.
This program is distributed in the hope that it will be useful,
one moar bootnode >>
enode://fea6b90de2f6b0ae6657168166dd168af4694b855d56d1e54607d65fec242b77b8eae15e8d250abdd97df008317044ca8538df4bc9986ad14d7edac8ae9349b6@139.59.220.32:30301
enode://ba547d19e0b4d2843f61baab2224d556b00827c68018872e4283f5cb493f7eeec7ffacebf1aa5598b86d67bb860e9acbd6f5c824f034e4c2d48153f396c4d652@192.168.1.102:30303
303
var confirmBlocks =13;
var counter = confirmBlocks;
function checkWork(chx) {
if(chx == 0 && counter > 0){ //countdown
counter--;
return startMiner(counter);
}else if(chx == 1 && eth.getBlock("pending").transactions.length > 0){ //TX in POOL
counter = confirmBlocks;
return startMiner(counter);
@nepalbitcoin
nepalbitcoin / ActivityToken.sol
Last active November 16, 2017 08:38
WIP : Ethereum ERC20 Token managed by discord bot. Eroding reward, Double burn / revenge.
pragma solidity ^0.4.18;
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
pragma solidity ^0.4.18;
/**
The MIT License (MIT)
Copyright (c) 2015-2016 Oraclize SRL (https:/oraclize.it/)
Copyright (c) 2016 Oraclize LTD (https:/oraclize.it/)
Copyright (c) 2016 Smart Contract Solutions, Inc. (https://openzeppelin.org/)
Copyright (c) 2018 Nepal Blockchain R&D. (https://github.com/nepal-blockchain)
Permission is hereby granted, free of charge, to any person obtaining
pragma solidity ^0.4.19;
/**
The MIT License (MIT)
Copyright (c) 2015-2016 Oraclize SRL (https:/oraclize.it/)
Copyright (c) 2016 Oraclize LTD (https:/oraclize.it/)
Copyright (c) 2016 Smart Contract Solutions, Inc. (https://openzeppelin.org/)
Copyright (c) 2017 Potato Coin Foundation. (https://potatoin.foundation)
Copyright (c) 2018 Nepal Blockchain R&D. (https://github.com/nepal-blockchain)

Keybase proof

I hereby claim:

  • I am nepalbitcoin on github.
  • I am nepalbitcoin (https://keybase.io/nepalbitcoin) on keybase.
  • I have a public key ASA2eX1M3iozuU78SKNpDkjW2EPnogbBZBAvPxI62nIM4Qo

To claim this, I am signing this object: