Install dependencies:
npm install -g @microsoft/rush
Initialize the project:
import { connectorsForWallets, RainbowKitProvider } from '@rainbow-me/rainbowkit'; | |
import '@rainbow-me/rainbowkit/styles.css'; | |
import { braveWallet, coinbaseWallet, injectedWallet, metaMaskWallet } from '@rainbow-me/rainbowkit/wallets'; | |
import { useMemo } from 'react'; | |
import { chain, configureChains, createClient, WagmiConfig } from 'wagmi'; | |
import { alchemyProvider } from 'wagmi/providers/alchemy'; | |
import { publicProvider } from 'wagmi/providers/public'; | |
const { chains, provider, webSocketProvider } = configureChains( | |
[ |
/* | |
/ _____// |______ ____ | | __ | |
\_____ \\ __\__ \ _/ ___\| |/ / | |
/ \| | / __ \\ \___| < | |
/_______ /|__| (____ /\___ >__|_ \ | |
\/ \/ \/ \/ | |
_________ .__ .__ | |
/ _____/__________ ____ ____ _____| |__ |__|_____ ______ | |
\_____ \\____ \__ \ _/ ___\/ __ \ / ___/ | \| \____ \/ ___/ | |
/ \ |_> > __ \\ \__\ ___/ \___ \| Y \ | |_> >___ \ |
import { app } from 'electron' | |
import { autoUpdater } from 'electron-updater' | |
import log from 'electron-log' | |
import axios from 'axios' | |
import semverGT from 'semver/functions/gt' | |
const quitAndInstall = () => { | |
autoUpdater.quitAndInstall() | |
} |
This is the simplest implementation you will find for a client/server WebSockets architecture using socket.io.
To see a full explanation, read my answer on SO here: https://stackoverflow.com/a/24232050/778272.
If you're looking for examples using frameworks, check these links:
import React from 'react'; | |
import { View, StyleSheet, Animated } from 'react-native'; | |
const styles = StyleSheet.create({ | |
imageOverlay: { | |
position: 'absolute', | |
left: 0, | |
right: 0, | |
bottom: 0, | |
top: 0, |
import SQLite from 'react-native-sqlite-2' | |
import {Platform} from "react-native"; | |
const openedDb = {}; | |
/** | |
* Wrapper for react-native-sqlite-2. | |
* Methods: | |
* <ul> | |
* <li>Promise<Array<Object>> {@link execute}(statement, ...variables) : Execute a statement. Variables will be binded into the statement. It returns the list of items matching the statement.</li> |
select jb.job_id, em.employee_id, em.first_name, em.last_name, jb.min_salary | |
from jobs jb | |
join employees em | |
on em.job_id=jb.job_id |
# post_loc.txt contains the json you want to post | |
# -p means to POST it | |
# -H adds an Auth header (could be Basic or Token) | |
# -T sets the Content-Type | |
# -c is concurrent clients | |
# -n is the number of requests to run in the test | |
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/ |