Skip to content

Instantly share code, notes, and snippets.

View anegg0's full-sized avatar

Gaël Blanchemain anegg0

View GitHub Profile
@anegg0
anegg0 / merge-conflict-rebase.md
Created March 11, 2026 21:22 — forked from scottyhq/merge-conflict-rebase.md
GitHub PR Merge Conflict Resolution with Rebase

How to rebase a pull request to fix merge conflicts

It's quite common to open up a pull request on GitHub and be confronted with the message This branch has conflicts that must be resolved. This situation arises when you create a feature branch on an older commit from the master branch. Maybe you forgot to run git pull master before git checkout -b geocoding_vignette or maybe a collaborator changed some of the same files on GitHub while you've been working on new things. There are many ways to fix this. One is using the Web Editor build into GitHub and fixing conflicts by hand. This works great if there are not too many conflicts.

Another technique is to rebase your pull request onto the master branch (Move your additional commits on top of the most recent master commit). This is conceptually clean, but sometimes confusing in practice to do cleanly. This example walks through the process where you want to do a rebase, and resolve conflicts by overwriting whatever is on the master branch with change

#!/bin/bash
# GitHub PR Files Checker
# Shows all files that would appear in a GitHub pull request from the current branch
# Usage: ./pr-files-check.sh [options]
# Options:
# -v, --verbose Show detailed file information including line changes
# -s, --summary Show only summary statistics
# -h, --help Show this help message
Directory structure:
└── offchainlabs-stylus-sdk-rs/
├── Cargo.toml
├── rust-toolchain.toml
├── ci/
├── examples/
│ ├── erc20/
│ │ ├── Cargo.toml
│ │ ├── rust-toolchain.toml
│ │ ├── node_modules/
Directory structure:
└── offchainlabs-arbitrum-sdk/
├── LICENSE
├── audit-ci.jsonc
├── hardhat.config.ts
├── docs/
└── packages/
├── ethers-viem-compat/
└── sdk/
├── typedoc_md.js

└── arbitrum-docs └── how-arbitrum-works ├── 01-a-gentle-introduction.mdx ├── 02-transaction-lifecycle.mdx ├── 03-sequencer.mdx ├── 04-geth-at-the-core.mdx ├── 05-separating-execution-from-proving.mdx ├── 06-optimistic-rollup.mdx ├── 07-interactive-fraud-proofs.mdx ├── 08-anytrust-protocol.mdx

@anegg0
anegg0 / index.html
Created July 21, 2023 22:15
Terminal Output
<pre><output>webpack: Compiled successfully.
webpack: Compiling...
Hash: 33d8c38093d5e8261eac
Version: webpack 3.11.0
Time: 1337ms
Asset Size Chunks Chunk Names
project.js 12.3 MB 0 [emitted] [big] project
dashboard.js 6.36 MB 1 [emitted] [big] dashboard
organize.js 5.29 MB 2 [emitted] [big] organize
proPens.js 4.92 MB 3 [emitted] [big] proPens

Using Receipt Status

Since the Byzantium fork, Ethereum provides with a way to know if a transaction succeeded by checking its receipt status. A receipt status can have a value of 0 or 1 which translate into:

  • 0 transaction has failed (for whatever reason)

  • 1 transaction was succesful.

How to retrieve a transaction status with Nethereum

Estimating the cost of a transaction with Nethereum

Documentation about Nethereum can be found at: https://docs.nethereum.com

The purpose of this sample is to estimate the gas cost of a simple transaction and modify the assigned values of gas and gasprice.

Ethereum and Gas: a primer

Gas is the pricing system used for running a transaction or contract in Ethereum. The gas system is not very different from the use of kW-h for measuring electricity home use. One difference from actual energy market is that the originator of the transaction sets the price of gas, which the miner can accept or not, this causes an emergence of a market around gas. You can see the evolution of the price of gas at: .

@anegg0
anegg0 / multiple.cs
Last active November 25, 2019 16:06
multiple balance outputs
using Nethereum.Web3;
using Nethereum.ABI.FunctionEncoding.Attributes;
using Nethereum.Contracts.CQS;
using Nethereum.Util;
using Nethereum.Web3.Accounts;
using Nethereum.Hex.HexConvertors.Extensions;
using Nethereum.Contracts;
using Nethereum.Contracts.Extensions;
using Nethereum.RPC.Eth.DTOs;
using System;
uusing Nethereum.Web3;
using System;
using Nethereum;
using Nethereum.Web3;
using System.Threading;
using System.Threading.Tasks;
using Nethereum.Web3.Accounts;
using Nethereum.Web3.Accounts.Managed;
public class LogProcessing_WithInDepthConfiguration