- Clean syntax. is better than
- Fast
- React-like mindeset when styling, not every react component needs to be more than just styles.
- 1 more thing to organize in JS
const httpLink = new HttpLink({ uri: Meteor.absoluteUrl('graphql') }); | |
const authLink = new ApolloLink((operation, forward) => { | |
const token = Accounts._storedLoginToken(); // from local storage | |
operation.setContext(() => ({ | |
headers: { | |
'meteor-login-token': token, | |
}, | |
})); | |
return forward(operation); | |
}); |
import React from 'react'; | |
import { renderToNodeStream } from 'react-dom/server'; | |
import { StaticRouter } from 'react-router'; | |
import { ServerStyleSheet } from 'styled-components'; | |
import { onPageLoad } from 'meteor/server-render'; | |
import { Helmet } from 'react-helmet'; | |
import 'isomorphic-fetch'; | |
// Apollo | |
import { ApolloProvider, getDataFromTree } from 'react-apollo'; | |
import { ApolloClient, Observable } from 'apollo-client'; |
// get's called from react dropzone when file is dropped | |
onImageDrop = (files) => { | |
this.handleImageUpload(files[0]); | |
} | |
async handleImageUpload(file) { | |
const data = new FormData(); | |
data.append('file', file); | |
data.append('upload_preset', CLOUDINARY_UPLOAD_PRESET); | |
const upload = await fetch(CLOUDINARY_UPLOAD_URL, { |
alias l="ls -la" | |
alias add="git add ." | |
alias com="git commit -m" | |
alias push="git push" | |
alias start="npm run start" | |
alias deploy="npm run deploy" | |
alias in="npm install --save" | |
# FYI these are for FishShell, I'm not entirely sure of Bash or ZSH alias syntax but you get the idea. |
// ___ _ | |
// | | _| |_ | |
// | | |_ _| | |
// | | |_| | |
// | |___ | |
// | | | |
// |_______| | |
// | |
// https://www.leveluptutorials.com/ | |
// @leveluptuts |
[ | |
{ "key": "ctrl+1", "command": "workbench.action.focusFirstEditorGroup" }, | |
{ "key": "ctrl+2", "command": "workbench.action.focusSecondEditorGroup" }, | |
{ "key": "ctrl+3", "command": "workbench.action.focusThirdEditorGroup" }, | |
{ "key": "cmd+1", "command": "workbench.action.openEditorAtIndex1" }, | |
{ "key": "cmd+2", "command": "workbench.action.openEditorAtIndex2" }, | |
{ "key": "cmd+3", "command": "workbench.action.openEditorAtIndex3" }, | |
{ "key": "cmd+4", "command": "workbench.action.openEditorAtIndex4" }, | |
{ "key": "cmd+5", "command": "workbench.action.openEditorAtIndex5" }, | |
{ "key": "cmd+6", "command": "workbench.action.openEditorAtIndex6" }, |