Skip to content

Instantly share code, notes, and snippets.

View brenopolanski's full-sized avatar
🦙
Llama Llama

Breno Polanski brenopolanski

🦙
Llama Llama
View GitHub Profile

Introduction

EigenLayer introduces the possibility of re-using ethereum consensus, and IMO the most interesting usecase for that would be building a decentralized two-way and security-optimal bridge between Bitcoin and Ethereum.

All bridges rely on the security of the two chains they connect and the security of the custodian^[1] used for bridging, since if the security of any of those 3 were to fail, it would be possible to drain the bridge (eg: if its possible to double-spend on any of the two chains an attacker can redeem the same coin multiple times).

However, if a significant amount of the total ETH staked were to be restaked securing this bridge, the custodian would be piggybacking on ethereum security, so those two become the same and thus you'd remove the custodian from your list of dependencies and you're left with only having to depend on the security of the two chains, which is the theoretical ceiling of security. In other words, you'd achieve the best possible security.

But not just that, you

@brenopolanski
brenopolanski / index.html
Created May 19, 2024 18:00 — forked from bennettdams/index.html
Rotate a text 180° with TailwindCSS
<div className="flex w-1/6>
<p className="transform rotate-180 text-center" style={{ writingMode: 'vertical-rl' }}>
Text
</p>
</div>
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/600.8.9 (KHTML, like Gecko) Version/8.0.8 Safari/600.8.9
Mozilla/5.0 (iPad; CPU OS 8_4_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12H321 Safari/600.1.4
Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0)
@brenopolanski
brenopolanski / slugify.js
Created November 30, 2022 12:44 — forked from mathewbyrne/slugify.js
Javascript Slugify
function slugify(text)
{
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, ''); // Trim - from end of text
}
@brenopolanski
brenopolanski / file-upload.tsx
Created May 5, 2021 00:37 — forked from Sqvall/file-upload.tsx
File Upload with Chakra UI and react-hook-form
import { ReactNode, useRef } from 'react'
import { Button, FormControl, FormErrorMessage, FormLabel, Icon, InputGroup } from '@chakra-ui/react'
import { useForm, UseFormRegisterReturn } from 'react-hook-form'
import { FiFile } from 'react-icons/fi'
type FileUploadProps = {
register: UseFormRegisterReturn
accept?: string
multiple?: boolean
children?: ReactNode
@brenopolanski
brenopolanski / README.md
Created April 30, 2021 14:37
firebase x nextjs ReferenceError: navigator is not defined
> Build error occurred
ReferenceError: navigator is not defined
    at Object.areCookiesEnabled (/vercel/28f5c7d0/node_modules/@firebase/util/dist/index.node.cjs.js:650:5)
if (!firebase.apps.length) {
  firebase.initializeApp(firebaseConfig);
 firebase.analytics();

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@brenopolanski
brenopolanski / tailwind.responsive-font.js
Created February 23, 2021 19:24 — forked from leMaur/tailwind.responsive-font.js
Responsive font-size for Tailwindcss
const plugin = require('tailwindcss/plugin')
module.exports = plugin(function ({ addBase, theme }) {
addBase({
':root': {
'--min-fs': theme('variable-font.min-fs'),
'--max-fs': theme('variable-font.max-fs'),
'--min-vw': theme('variable-font.min-vw'),
'--max-vw': theme('variable-font.max-vw'),
'--min-fs-rem': 'var(--min-fs) * 1rem',
@brenopolanski
brenopolanski / px-rem-tw.csv
Created February 6, 2021 01:19 — forked from trevorgreenleaf/px-rem-tw.csv
PX to REM'S to TAILWIND CSS
PX REM TW
4 0.25 1
8 0.5 2
16 1 4
32 2 8
48 3 12
64 4 16
80 5 20
96 6 24
112 7 28
@brenopolanski
brenopolanski / README.md
Created January 26, 2021 17:45
Inkscape: convert text to object

First Ctrl+K (path combine), then Ctrl+J (dynamic offset) will work.