I started this gist as an index for all of the staking reports. Almost a year in, we migrated everything to https://polkadot.network/tag/staking-updates/. This page will no longer be updated:
The goal is to package a server-side rendered Next.js app as SPA for capacitor.
Pages with dynamic routes/data use getServerSideProps(). For capacitor we need at least one page that can be rendered statically, preferably the index page.
When there are pages that use getServerSiedeProps()
we can't use next export
(it will fail with an error).
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
// "rxjs": "^6.2.1" && "redux-observable": "^1.0.0-beta.2" | |
import { of, from, forkJoin } from 'rxjs'; | |
import { mergeMap, catchError, ignoreElements, tap } from 'rxjs/operators'; | |
const setData = (type, payload={}) => ({type, payload}) | |
// Run simple async request | |
export const asyncEpic = (action$, store, { api }) => | |
action$.ofType('START_ASYNC') |
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
// @flow | |
import { PureComponent, type Node, Fragment } from 'react'; | |
import { TimelineLite } from 'gsap'; | |
import SplitText from 'Lib/gsap-bonus/umd/SplitText'; | |
import Waypoint from 'react-waypoint'; | |
type RevealTextProps = { | |
children: Node, | |
waypointTopOffset: string, | |
waypointBottomOffset: 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
<?php | |
//Capture a new member signup. Only ever triggers once for each new member. | |
//Does not trigger for exising members who have subscribed to a Membership before. | |
// | |
//The user may not be logged in when this is called | |
//as it is triggered when a user is added over the REST API, | |
//and also when a user is added from the dashboard (MemberPress -> Members -> Add New) | |
function mepr_capture_new_member_signup_completed($event) { | |
$user = $event->get_data(); | |
$txn_data = json_decode($event->args); |
A collection of links to the excellent "Composing Software" series of medium stories by Eric Elliott.
Edit: I see that each post in the series now has index, previous and next links. However, they don't follow a linear flow through all the articles with some pointing back to previous posts effectively locking you in a loop.
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
<!doctype html> | |
<!-- Adapted from https://gist.github.com/tfausak/2222823 --> | |
<html> | |
<head> | |
<title>Mobile-ready web app</title> | |
<!-- CONFIGURATION --> |
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
// Helpers. | |
import { convertToText } from './'; | |
/* | |
You would call this when receiving a plain text | |
value back from an API, and before inserting the | |
text into the `contenteditable` area on a page. | |
*/ | |
const convertToMarkup = (str = '') => { | |
return convertToText(str).replace(/\n/g, '<br>'); |
NewerOlder