Skip to content

Instantly share code, notes, and snippets.

View drdpedroso's full-sized avatar
🌱
The day you plant the seed is not the day you eat the fruit

Eduardo Pedroso drdpedroso

🌱
The day you plant the seed is not the day you eat the fruit
  • São Paulo, Brazil
View GitHub Profile
import { useRef, useState } from 'react'
import type { WebViewMessageEvent } from 'react-native-webview'
import WebView from 'react-native-webview'
import { useCommunityMemberContext } from '~/context/CommunityMemberContext'
import { useThemeContext } from '~/context/theme/ThemeContext'
import { useOpenUrl } from '~/hooks/useOpenUrl'
import { isUrlFromCircleCommunity } from '~/utils/url'
type HeightMessage = {
import React, { createContext, useCallback, useContext, useEffect, useState } from 'react'
import { getConfig } from '../config'
import SignClient from '@walletconnect/sign-client'
import QRCodeModal from '@walletconnect/qrcode-modal'
import { AccountContext } from './AccountContext'
import { useLocalStorage } from '../hooks/useLocalStorage'
const { kdaNetworkId, walletConnectProjectId } = getConfig()
export const KDA_NAMESPACE = 'kadena'
@drdpedroso
drdpedroso / terminal-git-branch-name.md
Created June 22, 2019 06:54 — forked from joseluisq/terminal-git-branch-name.md
Add Git Branch Name to Terminal Prompt (Mac)

Add Git Branch Name to Terminal Prompt (Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
@drdpedroso
drdpedroso / providerCompose.js
Created June 12, 2019 10:59 — forked from stolinski/providerCompose.js
ProviderComposer
function ProviderComposer({ contexts, children }) {
return contexts.reduceRight(
(kids, parent) =>
React.cloneElement(parent, {
children: kids,
}),
children
);
}
<template>
<section class="container">
<h1 class="title">
Gratitude Diary
</h1>
<button class="button" @click="logout">
Logout
</button>
<hr>
<VueCal
const stream = require('stream')
const cache = new Map() // you might wanna use an lru here
function createCacheStream (url) {
const buf = []
return stream.Transform({
transform: function (data, enc, cb) {
buffer.push(data)
cb(null, data)
},
04091c012614c13e3e92e3cca6be1692c120cf8394ec83a62ca5989e995cb402b0808190018fcd4d1115f82a2b3ecdef5295b58902c740be0c815ce9da3e4ab807