Shortcut | Task | |
---|---|---|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Block with maximum transaction | |
var max=0; | |
for (var i = 0; i < eth.blockNumber; i++) { | |
if (web3.eth.getBlock(max).transactions.length < web3.eth.getBlock(i).transactions.length) { | |
console.log(i, web3.eth.getBlock(i).transactions.length); | |
max = i; | |
} | |
} | |
// auto-mining |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fiboncacci = (n, fibb=[]) => { | |
count=0; | |
fib = (i, j) => { | |
if (count == n) return fibb; | |
fibb.push(i); | |
count++; | |
return fib(i + j, i); | |
} | |
return fib(0, 1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe", | |
"explorer.confirmDragAndDrop": false, | |
"explorer.confirmDelete": false, | |
"window.zoomLevel": -1, | |
"editor.minimap.maxColumn": 80, | |
"editor.minimap.side": "right", | |
"fileHeaderComment.parameter": { | |
"*": { | |
"author": "Subhod I", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.18; | |
contract demo { | |
mapping(uint => uint) public map; | |
event Finished(); | |
function seedMap(uint _start, uint _end) public { | |
for(uint i=_start;i<_end;i++) { | |
map[i] = i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Web3=require('web3') | |
web3= new Web3(new Web3.providers.HttpProvider("http://127.0.0.1:7545")) | |
web3.isConnected() | |
web3.eth.sendTransaction({from:web3.eth.accounts[0],to:"0x4872f45d4c5ee0ddf7e0b5a70fd2ddcce0bd0f63",value:99999999999}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksifQ.eyJpYXQiOjE1MjY4OTMxNjYsImlzcyI6ImRpZDp1cG9ydDpCWDE4Sk1lVER4SlpHWmJXeEtqQUplVjdtcVFCR3dMQk5ZMlYiLCJhdWQiOiJCWDE4Sk1lVER4SlpHWmJXeEtqQUplVjdtcVFCR3dMQk5ZMlYiLCJ0eXBlIjoiY2hhaW5Qcm92Iiwic3ViIjoiQlgxOEpNZVREeEpaR1piV3hLakFKZVY3bXFRQkd3TEJOWTJWIiwiZGFkIjoiMHg4Y2E5Nzg5MTIwNjA1YzFmMzM2NGU4NTQ1NmYzZTYwMmU1NTI1YTAzIiwiY3RsIjoiMHhjNzliYTMwNzQ0ODZmZGVjNmFhMzczYTg5YWQ0YWYzMzZmNDhjMzZlIn0.ayeItyqMHfIZzBeDITQPrVJizrUX2TCBi4dA-kxsvfJI4Ty66Ba-pb1MEzaEcpXx_X-J-MQHzz-gc2kuq7k5Fw |
Cleanup local and reset to upstram master http://stackoverflow.com/questions/9646167/clean-up-a-fork-and-restart-it-from-the-upstream
git remote add upstream /url/to/original repo that you forked
git fetch upstream
git checkout master
git reset --hard upstream/master
git push origin master --force
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'alias cwd="cd '$PWD'"' >> ~/.bashrc | |
source ~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get -y install stylish-haskell | |
echo "\n Current working directory $PWD/src \n" | |
FILE="$(find ./src/ -name '*.hs')" | |
for file in $FILE | |
do | |
echo "Processing "$file | |
echo "$(stylish-haskell $file)" > $file | |
done | |
echo "done" |