Skip to content

Instantly share code, notes, and snippets.

View gRoussac's full-sized avatar
🎠
Working from home

Gregory Roussac gRoussac

🎠
Working from home
View GitHub Profile
@gRoussac
gRoussac / test_transfer.ts
Last active March 6, 2023 20:39
test debug discord
async getCasperRatio(usd_amount: number): Promise<number> {
const js = await (await fetch("https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=casper-network&order=market_cap_desc&per_page=4&page=1&sparkline=false")).json();
const price = js[0].current_price;
console.log(price);
const integer = Math.round((usd_amount * 1000000000 / price));
return integer; // this is not going to work with big numbers
}
async customerPayment1(sender_publicKey: string, reciver_publicKey: string, amount_in_usd: number) {
const amount_of_motes = await this.getCasperRatio(amount_in_usd);
@gRoussac
gRoussac / 00.howto_install_phantomjs.md
Last active July 21, 2016 13:19 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 2.1.1

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev