Skip to content

Instantly share code, notes, and snippets.

View mattsse's full-sized avatar
🦀

Matthias Seitz mattsse

🦀
View GitHub Profile
@mattsse
mattsse / gist:70255d4db2eb9ef3c99a93138c4c4e1c
Last active March 9, 2024 10:22
flatten etherscan source
cast etherscan-source -d . 0x7b2a3cf972c3193f26cdec6217d27379b6417bd0
cd AToken/@aave/protocol-v2
forge flatten contracts/protocol/tokenization/AToken.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2 <0.9.0;
pragma experimental ABIEncoderV2;
import "./StdStorage.sol";
import "./Vm.sol";
abstract contract StdCheatsSafe {
VmSafe private constant vm =
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import "forge-std/Test.sol";
interface Serializer {
function serialize(bool) external;
function serialize(uint256) external;
function serialize(int256) external;
fn fmt_trailing_newline<I, D>(items: I, f: &mut fmt::Formatter<'_>) -> fmt::Result
where
I: IntoIterator<Item = D>,
D: fmt::Display,
{
let mut iter = items.into_iter().peekable();
if iter.peek().is_none() {
return Ok(())
}
separated(iter, f, '\n')?;

Keybase proof

I hereby claim:

  • I am mattsse on github.
  • I am mattsse (https://keybase.io/mattsse) on keybase.
  • I have a public key ASBYWgom5Vn8H9E0JCCDeJ4pzOkxbiKmJfiyCvltxGhiIQo

To claim this, I am signing this object:

@mattsse
mattsse / main.yml
Created April 29, 2020 08:42
publish github pages
on: [push, pull_request]
name: Continuous integration
jobs:
check:
name: Compile and Test
runs-on: ubuntu-latest
strategy:
matrix:
@mattsse
mattsse / term.rs
Created March 16, 2019 21:48
helper functions to colorize output
pub fn info(line: &str) {
println!("\x1b[1m[\x1b[32m{}\x1b[0;1m]\x1b[0m {}", '+', line);
}
pub fn debug(line: &str) {
println!("\x1b[2K\x1b[1m[\x1b[34m{}\x1b[0;1m]\x1b[0m {}", '#', line);
}
pub fn success(line: &str) {
println!("\x1b[1m[\x1b[34m{}\x1b[0;1m]\x1b[0m {}", '*', line);
#!/usr/bin/env bash
DIR="${PWD}/"
GIT_IGNORE="$(eval echo ~${SUDO_USER})/git/gitignore/"
if [[ $2 ]]; then
DIR="$DIR$2/"
fi
_ignorefiles="${GIT_IGNORE}*.gitignore"
@mattsse
mattsse / .bash_profile
Created February 20, 2018 12:48 — forked from stephenll/.bash_profile
.bash_profile file on Mac OS X
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases.
# Much of this was originally copied from:
# http://natelandau.com/my-mac-osx-bash_profile/
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
@mattsse
mattsse / build_cross_gcc
Created July 12, 2017 11:03 — forked from preshing/build_cross_gcc
A shell script to download packages for, configure, build and install a GCC cross-compiler.
#! /bin/bash
set -e
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG
trap 'echo FAILED COMMAND: $previous_command' EXIT
#-------------------------------------------------------------------------------------------
# This script will download packages for, configure, build and install a GCC cross-compiler.
# Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running.
# If you get an error and need to resume the script from some point in the middle,
# just delete/comment the preceding lines before running it again.