- learn blockchain concepts
- learn ethereum
- learn how to use metamask
- learn how to use hardhat (https://hardhat.org/)
- learn how to deploy and interact with a smart contract
- learn common smart contract standards like ERC20 (token), ERC721 (nft), ERC1155 (opensea)
- learn ipfs
- learn how to read blockchain explorers like https://etherscan.io/
- learn how to use web3 and etherjs
- learn solidity
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 firebase from 'firebase/app'; | |
import 'firebase/messaging'; | |
import { useEffect, useRef } from 'react'; | |
import config from '../config'; | |
import firebaseConfig from './firebaseConfig'; | |
import { PushTokenAddMutation } from './__generated__/PushTokenAddMutation.graphql'; | |
import { PushTokenAdd, USER_PUSHENDPOINT_TYPE } from './PushTokenAddMutation'; |
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 { addMiddleware } from 'graphql-add-middleware'; | |
addMiddleware(schema, traceResolveMiddleware); |
- When Gatsby starts up, it will read
gatsby-config.js
first. - As you can see below, we use that file to
require('ts-node').register()
which registers a TypeScript evaluator that will be used when Gatsby reads all other API Javascript files. In other words, we only need to do this once in our entire codebase and not in other Gatsby files likegatsby-node.js
. - Our
gatsby-config.js
re-exports all the exported variables available ingatsby-config.ts
.
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
export const safeGoBack = ( | |
history: History, | |
alternativeRoute: string, | |
) => { | |
if (history.length > 2) { | |
history.goBack(); | |
return; | |
} | |
history.push(alternativeRoute); |
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
function adb_connect { | |
# PORT used to connect. Default: 5555 | |
PORT=${1:-5555} | |
# IP address from current device connected | |
IP_ADDRESS=`adb shell ip route | awk '{print $9}'` | |
echo "ADB connect to $IP_ADDRESS on port $PORT" | |
# Change connection from usb to tcpip using $PORT |
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
adb shell input keyevent 82 && adb shell input keyevent 19 && adb shell input keyevent 23 |
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 { | |
isFetchingEnd, | |
isFetchingTop, | |
onRefresh, | |
onEndReached, | |
} = useRelayPagination(relay, users); | |
const isRefreshing = isFetchingEnd || isFetchingTop; | |
<FlatList |
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
{ | |
"annotations": { | |
"list": [ | |
{ | |
"builtIn": 1, | |
"datasource": "-- Grafana --", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", | |
"name": "Annotations & Alerts", |
One of the key parts of the save/load process in Factorio is that it must be deterministic. This means that for a given save file (when no external factors change) saving, exiting, and loading the save shouldn't change any observable behavior.
There are a few reasons and benefits for this strict requirement:
- Without it: You couldn't join a running multiplayer game (and by proxy save, exit, and resume one)
- Without it: the replay system wouldn't work if you ever saved, exited, and resumed playing.
- With it: we can easily test that saving and loading produces no observable change letting us know we implemented save/load correctly.
- With it: you won't see things change randomly as a result of "reloading" like you do in so many other games.
NewerOlder