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
/** | |
* @author Taras Labiak <[email protected]> | |
*/ | |
const http = require('http'); | |
const https = require('https'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const { promisify } = require('util'); |
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
const https = require('https') | |
const fs = require('fs') | |
const entites = '' | |
function fetch(path) { | |
return new Promise(function (resolve, reject) { | |
const req = https.request({ | |
hostname: 'etherscan.io', | |
method: 'GET', |
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
FILENAME=/tmp/swap-$(date +%s) | |
dd if=/dev/zero of=${FILENAME} bs=1M count=$1 | |
mkswap ${FILENAME} | |
chmod 600 ${FILENAME} | |
swapon ${FILENAME} |