Skip to content

Instantly share code, notes, and snippets.

View vamshi4001's full-sized avatar
🏠
Working from home

Vamshi Vangapally vamshi4001

🏠
Working from home
View GitHub Profile
@vamshi4001
vamshi4001 / expiring-money
Last active April 16, 2020 15:35
An abstract concept evaluating the usage of expiring contracts
On April 15th, an amount of $2400 hit bank accounts in the US for many as part of the stimulus check.
If I see it from another perspective - most of thsoe who receive this money will be saving it instead of using it for expenses.
I am talking about those who still have jobs and earning money.
To provide a perspective - if the newly printed money is being distributed to individuals to boost the economy, it should be in circulation.
However, people are saving this chunk of money instead of spending it to boost economy and keep the engine running.
What if there is a concept of *expiring money* - something like airline credits or visa gift card with an end date.
That makes it possible to get the money printed to be spent within a specific time and there's no chance for anyone to hoard this for future.
Another idea spawned from this, which is more interesting - because it could help stop the corruption globally, if not in most of the developing nations.
A common means of corruption is the money leaking out
@vamshi4001
vamshi4001 / usaCities.js
Created February 6, 2018 19:15 — forked from Lwdthe1/usaCities.js
JSON of 5,950+ USA Cities and Their States
[
{'city': 'Abbeville', 'state': 'Louisiana'},
{'city': 'Aberdeen', 'state': 'Maryland'},
{'city': 'Aberdeen', 'state': 'Mississippi'},
{'city': 'Aberdeen', 'state': 'South Dakota'},
{'city': 'Aberdeen', 'state': 'Washington'},
{'city': 'Abilene', 'state': 'Texas'},
{'city': 'Abilene', 'state': 'Kansas'},
Verifying my Blockstack ID is secured with the address 1GZ8JzHqRLbP7qptPNfhRe3jGrCDdjHTBJ https://explorer.blockstack.org/address/1GZ8JzHqRLbP7qptPNfhRe3jGrCDdjHTBJ
pragma solidity ^0.4.11;
contract TokenSale{
uint public maxTokens = 100*1000000;
uint public rate = 1000;
uint public fundingGoal = 10000 ether;
uint public minContribution = 0.1 ether;
uint public teamTokensPercent = 20;
uint public crowdsalePercent = 80;
uint public bounty = 10*1000000;
pragma solidity ^0.4.11;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal returns (uint256) {
uint256 c = a * b;
pragma solidity ^0.4.8;
/**
* Math operations with safety checks
*/
library SafeMath {
function mul(uint a, uint b) internal returns (uint) {
uint c = a * b;
assert(a == 0 || c / a == b);
0xeaE589f3eB29e9d12b2309bE74E96F7699a100e9
@vamshi4001
vamshi4001 / coinslist.json
Created June 18, 2017 21:52
JSON list of all cryptocurrencies and logos
var data = [
{
"src": "https://files.coinmarketcap.com/static/img/coins/16x16/bitcoin.png",
"name": "Bitcoin"
},
{
"src": "https://files.coinmarketcap.com/static/img/coins/16x16/ethereum.png",
"name": "Ethereum"
},
{
@vamshi4001
vamshi4001 / react-blogs.html
Created February 13, 2017 05:09
List of high quality blogs on react-native
<div class="md"><p>Going alphabetically by blog title through my "high quality blogs" subscriptions:</p>
<ul>
<li><a href="http://benmccormick.org/">Ben McCormick</a>: used to write mostly about Backbone, has now moved to React.</li>
<li><a href="http://cmichel.io/">Christoph Michel</a>: has written a number of good articles about React, React Native, and Redux</li>
<li><a href="http://randycoulman.com/blog/">Randy Coulman</a>: excellent, deep, well-written articles about Redux and functional programming techniques</li>
<li><a href="https://medium.com/@dan_abramov/">Dan Abramov</a>: It's Dan Abramov. Possibly the nicest, most helpful guy in the React/Redux community, who also happens to have written some of the most informative and influential articles about using React and Redux.</li>
<li><a href="http://www.davidmeents.com/">David Meents</a>: assorted React and Redux articles</li>
<li><a href="https://decembersoft.com/">Philip Davis</a>: Redux and Webpack tutorials</li>
<li><a href="http://goshakkk.name/">
var total = 0;
var x = $("._sz6");
for (var i = 0; i < x.length; i++) {
total += parseInt(x[i].textContent.replace(",","").substr(1,x[i].length)) || 0
}