Skip to content

Instantly share code, notes, and snippets.

@AminAlizadeh-m
AminAlizadeh-m / getTronTransactions.ts
Last active January 20, 2023 15:57
Get tron transaction with TatumAPI
// Get latest transaction of tron (TRC20 Tokens Like USDT)
const tatumURL = 'https://api.tatum.io/v3'; // https://tatum.io : Get more info and read docs and get a free api key!
const axiosRequestConfig: AxiosRequestConfig = {
headers: { 'x-api-key': 'TATUM_API_KEY' },
};
const address = 'TRON_ACCOUNT_ADDRESS'; // you can get from trust wallet or generate by your self
const { data } = await axios.get(
`${tatumURL}/tron/transaction/account/${address}/trc20`,
axiosRequestConfig,
);
@stevenvandervalk
stevenvandervalk / setup-certbot-script.sh
Created February 8, 2017 11:38
A bash script to install certbot and add crontab to renew the cert
#!/bin/bash
#
# This sets up Let's Encrypt SSL certificates and automatic renewal
# using certbot: https://certbot.eff.org
#
# - Run this script as root.
# - A webserver must be up and running.
#
# Certificate files are placed into subdirectories under
# /etc/letsencrypt/live/*.
@damienalexandre
damienalexandre / tool.php
Created October 3, 2011 09:47
Download large file from the web via php
<?php
/**
* Download a large distant file to a local destination.
*
* This method is very memory efficient :-)
* The file can be huge, PHP doesn't load it in memory.
*
* /!\ Warning, the return value is always true, you must use === to test the response type too.
*
* @author dalexandre