Skip to content

Instantly share code, notes, and snippets.

View eugenioclrc's full-sized avatar
💭
Day dreamer, night coder

Eugenio eugenioclrc

💭
Day dreamer, night coder
View GitHub Profile
/*
SOLUTION
contract PuzzleBoxSolution {
function solve(PuzzleBox puzzle) external payable {
bytes memory code = hex"602060....THE BYTECODE OUTPUT, huffc DragonFlyCTFsolution.huff -b";
address payable addr;
assembly {
addr := create2(0, add(code, 0x20), mload(code), 0)
}
@eugenioclrc
eugenioclrc / whitenoise.sol
Last active September 25, 2022 15:06
Whitenoise challenge submission
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.15;
interface ISolution {
/// @dev Returns the EOA you will be calling the Challenge contract
/// from. Used to ensure your solution cannot be used by other
/// participants.
function owner() external view returns (address);
/// @dev Your solution to the problem.
/// @return abi.encodePacked(uint128(evenSum), uint128(oddSum))
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Ballot
* @dev Implements voting process along with vote delegation
* Submission for ZKU (May 2022 Cohort) Background Assignment Submission
*/
contract Ballot {
// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
/**
* this is a submission for ZKU (May 2022 Cohort)
*/
contract HelloWorld {
// this is the stored number, will start on 0 by default
const UniswapV2FactoryArtifact = require('@uniswap/v2-core/build/UniswapV2Factory.json');
const UniswapV2PairArtifact = require('@uniswap/v2-core/build/UniswapV2Pair.json');
const UniswapV2Router02Artifact = require('@uniswap/v2-periphery/build/UniswapV2Router02.json');
const WETH9Artifact = require('@uniswap/v2-periphery/build/WETH9.json');
async function createMockWETH() {
// deploy mock WETH
const WETH9 = await ethers.getContractFactory(

Keybase proof

I hereby claim:

  • I am eugenioclrc on github.

  • I am eugenioclrc (https://keybase.io/eugenioclrc) on keybase.

  • I have a public key ASA2ShoCKZHvM8BRXE1NDC4dPPYNKPwfV0uUpHRc6UKEuAo

/*
ionic-rem.css
based on ionic 1.0.0-beta.11
makes it easy to scale all the things, e.g.
html {
font-size: 150%;
}
*/
@eugenioclrc
eugenioclrc / roll_dice.js
Last active August 29, 2015 13:58
A simple dice generator for dungeons and dragons
/**
* @returns {
* diceRoll:[int number that dices roll],
* number: int(sum of dices),
* bonus: int,
* total: number+bonus
* }
*/
function diceRoll(data){
// data val sample '1d8+12'
@eugenioclrc
eugenioclrc / gist:9568418
Last active August 29, 2015 13:57
phaser gravity posible problem
<html>
<head>
<script src="http://examples.phaser.io/_site/js/phaser.js"></script>
<script type="text/javascript">
var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render });
function preload() {
}
@eugenioclrc
eugenioclrc / gist:5897823
Created July 1, 2013 01:32
Tweet using phantomJS
/**
* @eugenioclrc, dedicado a Mariano "nosepuedemantener" S
* sudo apt-get install python g++ make
* sudo add-apt-repository ppa:chris-lea/node.js
* sudo apt-get update
* sudo apt-get install nodejs
* sudo npm install phantomjs
* ## Cuidado con el siguiente ln ! por ahi tenes que reescribirlo dependiendo de tu path
* ln -s ~/node_modules/phantomjs/lib/phantom/bin/phantomjs /usr/sbin/phantomjs
*/