This file contains hidden or 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
/* | |
Inspired by https://gist.github.com/daniele-rapagnani/2e7372210726b28aec8f0d2d1d149ffb | |
This script selects all links on a Google Spaces page with url, title and date. | |
Reload the page for every space and scroll down to the end (until it says | |
"The end is just a new beginning."). | |
Open the browser's console (right click -> inspect -> "Console") and paste these lines. | |
It then logs it to a HTML string which you can copy and save as "spaces-exports.html". | |
When changing to another service (e.g. Dropmark, Pocket ...) you can use the html file |
This file contains hidden or 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
/** | |
Simple (Node.js) CLI for the flatten array function. | |
**/ | |
const flattenArray = require('./flatten-array'); | |
const colors = { | |
reset: '\033[0m', | |
pink: '\033[35m', | |
red: '\033[31m', |
This file contains hidden or 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
{ | |
..... | |
// jest configuration | |
"moduleNameMapper": { | |
"^react-native$": "react-native-web", | |
"^@(.*)$": "<rootDir>/src$1" | |
} | |
..... | |
} |
This file contains hidden or 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 * as t from '@/actions/types'; | |
import ajax from '@/adapters'; | |
import getEndpoint from '@/constants/endpoints'; | |
export default store => next => async action => { | |
const { type, payload } = action; | |
if (type === t.SEND_REQUEST) { | |
const { | |
data, |
This file contains hidden or 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 * as actions from '@/actions'; | |
import * as t from '@/actions/types'; | |
export default store => next => action => { | |
if (action.type === t.SEND_REQUEST) { | |
store.dispatch(actions.incrementLoading()); | |
if (!action.payload.onFinally) { | |
action.payload.onFinally = []; | |
} |
This file contains hidden or 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
class UserProfile extends React.Component { | |
// ... | |
async componentDidMount() { | |
const { data } = await httpAdapter.get(`${API_URL}/users/${this.props.userId}`); | |
this.setState({ user: data.user }); | |
} | |
// ... | |
} |