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
from web3 import Web3 | |
class NFTUtils: | |
def __init__(self, w3, contract_address): | |
self.w3 = w3 | |
self.contract_address = self.w3.to_checksum_address(contract_address) | |
# La usamos con una ABI simple para comprobar si admite unos parámetro o no | |
# Y así detectamos el tipo de contrato | |
def _call_simple_function(self, function_name, *args): |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.3; | |
//import Open Zepplins ERC-20 contract | |
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol"; | |
//create a sample token that inherits Open Zepplins ERC-20 contract | |
contract WATER is ERC20 { | |
uint public amountAllowed = 1000000000000000000; |
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
javascript:document.body.innerHTML=' | |
<h1>Right-click Link Below To Open In Incognito Window</h1> | |
<img src="https://www.technojudo.com/wp-content/uploads/2019/03/Right-click-For-Incognito.jpg" alt="Right-click Link For Incognito Window"> | |
<br> | |
<p><a href='+location.href+'>'+location.href+'</a></p> | |
<img src="http://technoju.do/3MAhv"> | |
<p style="font-size:11px">© 2019 Paul Luckett, <a href="http://technoju.do/4Nspl">TechnoJudo.com</a></p>'; |
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
let jspdf = document.createElement("script"); | |
jspdf.onload = function () { | |
let pdf = new jsPDF(); | |
let elements = document.getElementsByTagName("img"); | |
for (let i in elements) { | |
let img = elements[i]; | |
console.log("add img ", img); | |
if (!/^blob:/.test(img.src)) { | |
console.log("invalid src"); | |
continue; |
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 | |
function diffMins($ihour, $imin, $ehour, $emin) | |
{ | |
if($ehour>=$ihour) | |
{ | |
$hours=$ehour-$ihour; | |
} | |
else | |
{ |
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 | |
function subMins($ihour, $imin, $iminutes) | |
{ | |
$hours=floor($iminutes/60); | |
$mins=$iminutes%60; | |
echo("Se restan $hours h + $mins m\n"); | |
$rhours=$ihour-$hours; |
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 | |
function sumMins($ihour, $imin, $iminutes) | |
{ | |
$hours=floor($iminutes/60); | |
$mins=$iminutes%60; | |
echo("Se suman $hours h + $mins m\n"); | |
$rhours=$ihour+$hours; |
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 | |
/** | |
* Generates human-readable string. | |
* | |
* @param string $length Desired length of random string. | |
* | |
* retuen string Random string. | |
*/ | |
function readable_random_string($length = 6) |
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 | |
# Author: Juan Antonio Tubio <[email protected]> | |
# GitHub: https://github.com/jatubio | |
# Twitter: @jatubio | |
# | |
# | |
# Special git cherry-pick with a git rebase interactive | |
# To use on branch with the last-commit | |
# |
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 off | |
setlocal enabledelayedexpansion | |
setlocal | |
set DestinationDrive=Z | |
set includeDir= | |
goto :include | |
:main |
NewerOlder