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
$btc = 0.00005; // amount | |
echo ($btc)*(pow(10, 8)); // bitcoin to satoshi | |
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
sudo docker create \ | |
--name=duckdns \ | |
-e PUID=1000 \ | |
-e PGID=1000 \ | |
-e TZ=Europe/Madrid \ | |
-e SUBDOMAINS=ejemplo1,ejemplo2 \ | |
-e TOKEN=TOKEN HERE \ | |
--restart unless-stopped \ | |
linuxserver/duckdns |
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
sudo nano /etc/netplan/00-installer-config.yaml | |
# This file is generated from information provided by | |
# the datasource. Changes to it will not persist across an instance. | |
# To disable cloud-init's network configuration capabilities, write a file | |
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following: | |
# network: {config: disabled} | |
network: |
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
version: '3' | |
services: | |
app: | |
image: 'jc21/nginx-proxy-manager:latest' | |
restart: always | |
ports: | |
- '80:80' | |
- '81:81' | |
- '443:443' | |
environment: |
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
try { | |
$url ='https://api.anyblock.tools/ethereum/ethereum/ropsten/rpc/ac-a196sasasd581576f/'; | |
$client = new Https(); | |
$opts = [ |
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
public function obtenerPorcentaje($cantidad, $total) { | |
$porcentaje = ((float)$cantidad * 100) / $total; // Regla de tres | |
$porcentaje = round($porcentaje, 0); // Quitar los decimales | |
return $porcentaje; | |
} |
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
<?php | |
namespace App\Http\Controllers; | |
class InfoController extends Controller | |
{ | |
/* | |
* | |
* Checking if cache file exist | |
* @ param string $name cache file name |
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
CREATE TABLE `paises` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`nombre` varchar(50) DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; | |
CREATE TABLE `ciudades` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`pais_id` int(11) DEFAULT NULL, | |
`nombre` varchar(50) DEFAULT NULL, |
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 bitcoin = require('bitcoinjs-lib'); | |
const TestNet = bitcoin.networks.testnet; | |
let keyPair = bitcoin.ECPair.makeRandom({ network: TestNet });//testnet | |
//var keyPair = bitcoin.ECPair.makeRandom();//main | |
var publicKey = keyPair.publicKey | |
var { address } = bitcoin.payments.p2pkh({ pubkey: publicKey }); | |
var privateKey = keyPair.toWIF(); | |
console.log(address) |