Skip to content

Instantly share code, notes, and snippets.

View krunkosaurus's full-sized avatar

Mauvis Ledford krunkosaurus

View GitHub Profile
@krunkosaurus
krunkosaurus / gist:12c221df81594904a99aed999d6ca92a
Last active October 6, 2021 13:07
Setting up an older Metamask to support eip1559 with Trezor
Problem: While using Metamask with your Trezor you get “replacement fee too low” or other error when doing transactions on some Web3 sites. This is because the MM update to support Trezor with eip1559 is not out yet.
Metamask Chrome versions:
- MetaMask Version 9.8.4 (old version that works with Trezor + MM + EIP-1559)
- MetaMask Version 10.2.0 (latest)
To install old version of Metamask:
1. First make sure you are running the latest Trezor firmware. At the time of this writing it's core/v2.4.2 from Aug 27.
2. Next you should do this in a new Chrome profile (Chrome > Profile > Add Profile) if you don't want to kill your existing Metamask. Chrome is actually able to run both copies of Metamask but I find many web3 sites will error if you try to keep both. By creating a new Chrome profile you can just have the old Metamask there.
3. Download the old version directly from the Github source only: https://github.com/MetaMask/metamask-extension/releases/tag/v9.8.4

Keybase proof

I hereby claim:

  • I am krunkosaurus on github.
  • I am krunkosaurus (https://keybase.io/krunkosaurus) on keybase.
  • I have a public key ASBAVSysEP2TPa9nladLOQG-k7xjyLySMV4553-vXXlHIwo

To claim this, I am signing this object:

0xbBd692014c7d1c70A9851EC3797fbC070A1e7DdF
@krunkosaurus
krunkosaurus / hasleapyear.js
Created September 6, 2012 22:41
hasLeapYear
function hasLeapYear(year){
if (year % 400 === 0){
return true;
}else if (year % 100 === 0){
return false;
}else if (year % 4 === 0){
return true;
}else{
return false;
}
@krunkosaurus
krunkosaurus / getdaysofmonth.js
Created September 6, 2012 22:14
Get days of a month of a year.
// Arguments are NOT 0-based.
function getDaysOfMonth(yearInt, monthInt){
return new Date(yearInt, monthInt, 0).getDate();
}
// Days of month for February 2011
getDaysOfMonth(2011, 2);
// 28
// Days of month for February 2012
<div id="full-body">
<div id="main-body">
<div class="side"></div>
<div class="main"></div>
</div>
<div id="footer-body">
<div class="side"></div>
<div class="main"></div>
</div>
</div>
;; load these only if using GUI emacs
(if (eq window-system 'x)
;; disables scrollbar
(scroll-bar-mode -1)
(menu-bar-mode -1)
;; disable the top toolbar
(tool-bar-mode -1)
(display-battery-mode 1))