Skip to content

Instantly share code, notes, and snippets.

View jaybuidl's full-sized avatar
📐

jaybuidl jaybuidl

📐
View GitHub Profile
//install ipfs-cluster
cd $HOME
wget https://dist.ipfs.io/go-ipfs/v0.4.14-rc1/go-ipfs_v0.4.14-rc1_linux-amd64.tar.gz
tar xf go-ipfs_v0.4.14-rc1_linux-amd64.tar.gz
sudo mv go-ipfs/ipfs /usr/local/bin/ipfs
ipfs init
//installing go
cd $HOME/ && wget https://storage.googleapis.com/golang/go1.10.1.linux-amd64.tar.gz
@geerlingguy
geerlingguy / aws-sts-token
Created September 19, 2018 16:05
AWS STS Token update playbook for MFA
#!/usr/bin/env ansible-playbook -c local
#
# AWS STS token update playbook.
#
# Updating AWS session tokens with STS can be a pain. But MFA is good. So let's
# automate the management of the .aws/credentials file to make it not painful!
#
# Usage:
#
# 1. Save this to a file like /usr/local/bin/aws-sts-token
@krisleech
krisleech / renew-gpgkey.md
Last active June 9, 2024 15:43
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@lambda-mike
lambda-mike / kakoune_cheatsheet.md
Last active July 11, 2023 23:49
My Kakoune cheatsheet

Kakoune

set verbose mode (good for learning) :set -add global autoinfo normal

Movement

Goto

10g - go to line 10

@spalladino
spalladino / falsehoods-that-ethereum-programmers-believe.md
Last active May 20, 2024 21:04
Falsehoods that Ethereum programmers believe

Falsehoods that Ethereum programmers believe

I recently stumbled upon Falsehoods programmers believe about time zones, which got a good laugh out of me. It reminded me of other great lists of falsehoods, such as about names or time, and made me look for an equivalent for Ethereum. Having found none, here is my humble contribution to this set.

About Gas

Calling estimateGas will return the gas required by my transaction

Calling estimateGas will return the gas that your transaction would require if it were mined now. The current state of the chain may be very different to the state in which your tx will get mined. So when your tx i

@amacneil
amacneil / dependabot-fix.yml
Created March 19, 2021 03:29
GitHub Action to update yarn 2 `yarn.lock` on dependabot PRs
# Automatically save updated `yarn.lock` file for dependabot PRs.
# This is necessary because dependabot doesn't support Yarn v2 yet:
# https://github.com/dependabot/dependabot-core/issues/1297
#
# Note: We use the `pull_request_target` event due to GitHub security measures.
# It is important to ensure we don't execute any untrusted PR code in this context.
# See: https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests
name: Dependabot
@yokawasa
yokawasa / ghcr.md
Last active May 20, 2024 09:51
ghcr (GitHub Container Registry)

ghcr (GitHub Container Registry) quickstart

CLI

To push container images to ghcr, you need peronal access token (PAT) - see how to create PAT

  1. Get PAT (personal access token)

Personal Settings > Developer settings > Personal access tokens

@fredlacs
fredlacs / contracts...BlockHashRelay.sol
Last active August 30, 2022 11:20
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
contract L1Sender {
address payable immutable l2Receiver;
constructor(address _l2Receiver) {
l2Receiver = payable(_l2Receiver);
}
@AndreiMVP
AndreiMVP / HumanSafeModule.sol
Last active July 3, 2023 10:19
A module that allows the owner of a safe registered on Proof of Humanity v2 to swap his old address with the new address corresponding to his PoH ID. Module is deployed with the PoH and Safe instances (the safe being used as governor; authorized is the keyword used for functions only the safe is allowed to call) and added to Gnosis Safe as a mod…
// SPDX-License-Identifier: MIT
pragma solidity 0.8.16;
contract Enum {
enum Operation {
Call,
DelegateCall
}
}
@cwhinfrey
cwhinfrey / message-taxonomy.md
Last active April 9, 2024 16:14
An Incomplete Taxonomy of Cross-Chain Messages

An Incomplete Taxonomy of Cross-Chain Messages

Single or Batched

Single Messages - Single messages have a single target address, target chainId, and data payload. The vast majority of cross-chain messages today are single messages.

Example:

function dispatchMessage(uint256 toChainId, address to, bytes calldata data) external payable returns (bytes32 messageId);