Skip to content

Instantly share code, notes, and snippets.

@dabit3
dabit3 / App.js
Last active November 16, 2022 05:46
Persisting a keypair for reading across clients
/*
* this file includes both a node.js script for creating a keypair
* as well as the client code for using it
*/
/* createKeypair.js */
const fs = require('fs')
const anchor = require("@project-serum/anchor");
const web3 = require('@solana/web3.js')
const account = anchor.web3.Keypair.generate();
@berodam
berodam / Navbar.js
Last active July 6, 2023 06:36
Styled Component based Responsive NavBar
import React from 'react';
import styled from 'styled-components';
import PropTypes from 'prop-types';
/*
* This is a ready to use component, just import it and plop it into your project as:
* <Navbar/>
* You might want to move all the style components into separate files for readability
* if you plan to do more with it.
*/