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
import {ContractTransaction, ContractReceipt} from "ethers"; | |
let tx: ContractTransaction = await contract.calledFunc(); | |
let receipt: ContractReceipt = await tx.wait(); | |
const events = receipt.events!.filter((x) => {return x.event == "EventName"}); | |
console.log(events[0].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.13; | |
/* | |
EtherStore is a contract where you can deposit and withdraw ETH. | |
This contract is vulnerable to re-entrancy attack. | |
Let's see why. | |
1. Deploy EtherStore | |
2. Deposit 1 Ether each from Account 1 (Alice) and Account 2 (Bob) into EtherStore |
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: GPL-3.0 | |
pragma solidity >=0.5.0 <0.9.0; | |
import "@openzeppelin/contracts/utils/Strings.sol"; | |
contract Test { | |
uint256 public value; |
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.8" | |
services: | |
hardhat: | |
image: node:16 | |
container_name: hardhat | |
working_dir: /home/node/app | |
volumes: | |
- ./:/home/node/app | |
ports: |
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 | |
- Symfony var-dumper : le var-dumper de Symfony, utile pour debug | |
- https://github.com/symfony/var-dumper | |
- https://packagist.org/packages/symfony/var-dumper | |
- Javascript | |
- Turbolinks : Accélère le chargement des pages en chargeant les pages en ajax | |
- https://github.com/turbolinks/turbolinks | |
- Vidéo Grafikart : https://www.youtube.com/watch?v=CjZnG_X85ww | |
- Tui Editor : Editeur WYSIWYG Markdown |
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 | |
// Il faut ET la permission 1 (OU la permission 2 ET la permission 4) | |
// ET la permission 3 | |
$permissions = [ | |
'and' => [ | |
'permission' => [ | |
'name' => $permission1, | |
'or' => [ |
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 | |
$permA = 1; | |
$permB = 2; | |
$permC = 4; | |
$permD = 8; | |
$permE = 16; | |
$permF = 32; | |
// Malgré le '|' c'est un set de permissions |
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
package { | |
'apache2': | |
ensure => present, | |
#name => 'apache2', | |
#provider => apt | |
} | |
package { | |
'php7.3': | |
ensure => present |
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 timeout = setTimeout(() => { | |
console.log("executé après 5 sec") | |
},5000) | |
setTimeout(() => { | |
console.log(Math.ceil((timeout._idleStart + timeout._idleTimeout)/1000 - process.uptime())); | |
}, 3000) |
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
find . -type d -empty -not -path "./.git/*" -exec touch {}/.gitkeep \; |
NewerOlder