type Customer {
id: ID!
email: String!
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Resources | |
* Medium: https://medium.com/walletconnect/how-to-build-a-react-native-dapp-with-walletconnect-28f08f332ed7 | |
* YouTube: https://www.youtube.com/watch?v=mGtEPQfqMV8 | |
* Docs: https://docs.walletconnect.com/2.0/advanced/walletconnectmodal/about?platform=react-native | |
*/ | |
import { WalletConnectModal, useWalletConnectModal } from "@walletconnect/modal-react-native" | |
import { StyleSheet, Text, View, TouchableHighlight } from "react-native" | |
const projectId = 'my-project-id' // see https://cloud.walletconnect.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { WebBundlr } from "@bundlr-network/client" | |
import { providers } from "ethers" | |
/* initialize some local state to store the bundlr instance */ | |
const [bundlrInstance, setBundlrInstance] = useState(null) | |
/* connect to the user's wallet */ | |
async function connect() { | |
await window.ethereum.request({ method: 'eth_requestAccounts' }) | |
const provider = new providers.Web3Provider(window.ethereum) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT OR Apache-2.0 | |
pragma solidity ^0.8.4; | |
import "@openzeppelin/contracts/utils/Counters.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
contract NFT is ERC721URIStorage { | |
using Counters for Counters.Counter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useEffect } from 'react' | |
import Web3 from 'web3' | |
const [account, setAccount] = useState(null) | |
let [web3, setWeb3] = useState(null) | |
useEffect(() => { | |
checkAccount() | |
}, []) | |
// invoke to connect to wallet account |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
Account, | |
clusterApiUrl, | |
Connection, | |
PublicKey, | |
sendAndConfirmTransaction, | |
SystemProgram, | |
Transaction, | |
} from '@solana/web3.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
import ReactPlayer from 'react-player' | |
import { HashRouter, Link, Switch, Route } from 'react-router-dom' | |
import AuthComponent from './AuthComponent' | |
import { Auth, API } from 'aws-amplify' | |
import { createComment as CreateComment } from './graphql/mutations' | |
import { listComments as ListComments } from './graphql/queries' | |
import { onCreateComment as OnCreateComment } from './graphql/subscriptions' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from lib import appsync | |
def lambda_handler(event, context): | |
print(event) | |
input = { | |
'name': 'test123', | |
'description': 'some cool description' | |
} |
The first post has been published: https://www.swyx.io/writing/cloud-distros
The second post has been adapted for Temporal: https://www.swyx.io/why-temporal/
these are bullet points of a blogpost on a topic i know very little about but i feel like there is something there that is happening as we speak
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sharp = require('sharp'); | |
const aws = require('aws-sdk'); | |
const s3 = new aws.S3(); | |
const Bucket = "BucketName"; | |
const transforms = [ | |
{ name: 'small', size: 85 }, | |
{ name: 'medium', size: 160 }, | |
{ name: 'large', size: 250 }, | |
]; |
NewerOlder