Skip to content

Instantly share code, notes, and snippets.

View mihaiserban's full-sized avatar
💭
👨🏻‍💻✨

Mihai Serban mihaiserban

💭
👨🏻‍💻✨
View GitHub Profile
@mihaiserban
mihaiserban / 00_README.md
Created November 29, 2021 19:36 — forked from LeZuse/00_README.md
Install node on Apple Silicon M1 both ARM and x86 (Rosetta)

Node.js on Apple Silicon

Node Version Manager (https://github.com/nvm-sh/nvm) works perfectly across native node installations as well as emulated Rosetta installations. The trick I am using here is to install one LTS version of node under Rosetta and another stable version as native binary.

TODO

  • find a way how to run the same node version on both platforms
@mihaiserban
mihaiserban / mint.js
Created December 7, 2021 10:27 — forked from zurgl/mint.js
solana js examples
const web3 = require('@solana/web3.js');
const splToken = require('@solana/spl-token');
(async () => {
//create connection to devnet
const connection = new web3.Connection(web3.clusterApiUrl("devnet"));
//generate keypair and airdrop 1000000000 Lamports (1 SOL)
const myKeypair = web3.Keypair.generate();
@mihaiserban
mihaiserban / snippets.js
Created December 7, 2021 10:28 — forked from beautyfree/snippets.js
Solana Web3 Snippets
import {
Account,
clusterApiUrl,
Connection,
PublicKey,
sendAndConfirmTransaction,
SystemProgram,
Transaction,
} from '@solana/web3.js';
@mihaiserban
mihaiserban / index.ts
Created December 23, 2021 13:09 — forked from dtmrc/index.ts
get metadata from metaplex
import * as web3 from "@solana/web3.js";
import * as metadata from "./metadata"; // see metadata.ts
const tokenAddress = new web3.PublicKey(
"CxkKDaBvtHqg8aHBVY8E4YYBsCfJkJVsTAEdTo5k4SEw"
);
(async () => {
// Connect to cluster
var connection = new web3.Connection(
import React, { useState } from "react";
import { SafeAreaView, Text } from "react-native";
import {
Gesture,
GestureDetector,
GestureHandlerRootView,
} from "react-native-gesture-handler";
export default function GestureDemo() {
const [tGestureStart, setTGestureStart] = useState<undefined | string>();