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
/** | |
* react-native project | |
*/ | |
class HeartButton extends Component<Props, State> { | |
handlePress = async e => { | |
if (this.state.saving) { | |
return | |
} | |
this.setState({ |
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
BLOCKERS: | |
If you use react-native-fbads, it doesn't build on android 0.62. | |
Either wait fix or remove. | |
I've openned an issue already: https://github.com/callstack/react-native-fbads/issues/244 | |
Some libs are also giving the Error "Super expression must either be null or a function" | |
You should open an issue and look for a PR that fixes it, or fix it yourself. | |
Example of a PR fixing this issue: https://github.com/expo/react-native-action-sheet/pull/162 | |
To install a dep from a github PR, add to package.json: |
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
#!/bin/bash | |
# script by arch forums user NuSkool | |
UZR=$(getent passwd 1000 | awk -F':' '{print $1}') | |
Pdate=$(date '+%m-%d-%Y') | |
Buplog="/home/${UZR}/Desktop/${Pdate}".backup | |
ROOTdev="/dev/sdc1" | |
HOMEdev="/dev/sdc3" | |
touch "${Buplog}" |
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
receitinha de bolo basica pra investir de maneira simples, pagando o minimo de taxas, e evitando fazer timing do mercado: | |
renda fixa: | |
curtissimo prazo (0 a 6 meses): cdb liquidez diaria | |
curto prazo (6 meses a 2 anos): lci lca | |
medio prazo (2-5 anos): cdbs com vencimentos fazendo ladeira | |
renda variavel (longo prazo, nao compre pensando em vender): | |
se for investir no brasil, compre um etf indexado pelo indice ibov todo mes | |
se for investir no exterior, compre um etf como aok (conservador), aom (moderado), aor (moderado agressivo) ou aoa (agressivo) dependendo do teu perfil de risco, todo mes | |
na renda fixa vc investe de 5 a 10 anos do seu custo mental de vida, como se fosse um fundo de emergencia, na renda variavel vc investe tudo q sobrar depois disso, sempre pensando em viver de dividendos, se vc compra uma acao ou etf pra vender, vc ta especulando, nao investindo, ai ja eh outro tipo de estrategia (edited) |
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
RTL relay testings | |
https://github.com/facebook/relay/blob/master/packages/relay-test-utils/__tests__/RelayMockEnvironmentWithComponents-test.js | |
https://github.com/entria/entria-fullstack/pull/109/files | |
Very easy native splash screen on Xcode | |
https://medium.com/@kelleyannerose/react-native-ios-splash-screen-in-xcode-bd53b84430ec | |
Init rn app on specific rn version | |
(rn cli 2.0.1+) | |
react-native-cli init --version="react-native@0.59.10" my project |
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
test.only('it works', async () => { | |
const environment = createMockEnvironment(); | |
const ComponentWithRouter = await mountWithRouter(LoginComponent, environment); | |
const { getByPlaceholderText, queryByText, getByTestId } = render( | |
<RelayEnvironmentProvider environment={environment}> | |
<ThemeProvider theme={theme}>{ComponentWithRouter}</ThemeProvider> | |
</RelayEnvironmentProvider>, | |
); | |
// Inject some input into component |
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 * as React from 'react'; | |
import { createRender, resolver as defaultResolver, getStoreRenderArgs } from 'found'; | |
import createFarceStore from 'found/lib/utils/createFarceStore'; | |
import { FarceElementResult, FarceRedirectResult, GetFarceResultArgs } from 'found/lib/server'; | |
import queryMiddleware from 'farce/lib/queryMiddleware'; | |
import BrowserProtocol from 'farce/lib/BrowserProtocol'; | |
import RouterProvider from 'found/lib/server/RouterProvider'; | |
import FarceActions from 'farce/lib/Actions'; | |
import { Resolver } from 'found-relay'; | |
import { RelayModernEnvironment } from 'relay-runtime/lib/store/RelayModernEnvironment'; |
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
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/ |
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
container: HTMLDivElement { _reactRootContainer: [ReactSyncRoot] }, | |
baseElement: HTMLBodyElement {}, | |
debug: [Function: debug], | |
unmount: [Function: unmount], | |
rerender: [Function: rerender], | |
asFragment: [Function: asFragment], | |
queryAllByLabelText: [Function: bound queryAllByLabelText], | |
getAllByLabelText: [Function: bound getAllByLabelText], | |
queryByLabelText: [Function: bound ], | |
findAllByLabelText: [Function: bound ], |
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
port = 8001 | |
host = localhost | |
console.log("Example app listening at http://%s:%s", host, port) | |
// Example app listening at http://localhost:8001 | |
// Carbon | |
// https://carbon.now.sh/?bg=rgba(171%2C%20184%2C%20195%2C%201)&t=seti&wt=none&l=auto&ds=true&dsyoff=20px&dsblur=68px&wc=true&wa=true&pv=56px&ph=56px&ln=false&fl=1&fm=Hack&fs=14px&lh=133%25&si=false&es=2x&wm=false&code=port%2520%253D%25208001%250Ahost%2520%253D%2520localhost%250Aconsole.log(%2522Example%2520app%2520listening%2520at%2520http%253A%252F%252F%2525s%253A%2525s%2522%252C%2520host%252C%2520port)%250A%252F%252F%2520Example%2520app%2520listening%2520at%2520http%253A%252F%252Flocalhost%253A8001 |