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
## iOS emphasis | |
We'll be focusing on getting the ins and outs of iOS apps because that's what we do better. | |
## The simulator | |
The simulator is the development tool we use to simulate an iPhone. | |
### What you should know: |
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
#! /usr/bin/env bash | |
# quit working | |
osascript -e 'quit app "React Native Debugger"' 2>/dev/null | |
osascript -e 'quit app "Terminal"' | |
osascript -e 'quit app "iTunes"' | |
osascript -e 'quit app "Simulator"' | |
osascript -e 'quit app "Xcode"' | |
osascript -e 'quit app "Slack"' | |
osascript -e 'quit app "Google Chrome"' |
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
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ | |
"key": "alt+tab", | |
"command": "editor.action.reindentlines", | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "alt+;", | |
"command": "editor.action.commentLine", |
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 throttle from 'lodash/throttle'; | |
import { useRef, useEffect, useCallback } from 'react'; | |
export default function useThrottle(func, time = 1000) { | |
const throttleRef = useRef(); | |
const callbackRef = useRef(); | |
useEffect(() => { | |
callbackRef.current = func; | |
}, [func]); |
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
#! /usr/bin/env bash | |
# LAZY GIT | |
# with commitlint automation. Does git add --all and builds commit message: | |
# lg foo bar -> chore(misc): foo bar | |
# lg chore bar -> chore(misc): bar | |
# lg chore app: fix stuff -> chore(app): fix stuff | |
lg() { | |
local args="$*" | |
local commitTypes=(build ci chore docs feat fix perf refactor revert style test) |
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
1 23º FloripaJS Devs Meetup | |
talk 45m "Objective-c tips for react native developers" | |
link: https://docs.google.com/presentation/d/1u5Lu_dDg9OA08fIWEs3XmgFB9PnV59UkTnvPfjDrQwQ/edit?usp=sharing | |
2 14º Encontro - ReactJS Florianópolis | |
talk 20m "React hooks" | |
junto com Arthur D'andrea https://github.com/arthurdandrea | |
3 15º Encontro - ReactJS Florianópolis | |
talk 45m "Patch-package, nodeify e browserify em react-native: codando node_modules" | |
link: https://docs.google.com/presentation/d/1cweWvAZz1sFJC4NJgMvNHQpaIBiMeO16og2xWJiIXwU/edit?usp=sharing | |
4 17º Encontro - ReactJS Florianópolis |
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
#!/usr/bin/env bash | |
# packager | |
adb reverse tcp:8081 tcp:8081 | |
adb -d reverse tcp:8081 tcp:8081 | |
adb -e reverse tcp:8081 tcp:8081 | |
echo "🚧 React Native Packager Redirected 🚧" |
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
// configurations is an array of objects | |
// add the object, select "Jest Tests" in debugger GUI (on the top left), add a breakpoint and hit F5! :rocket: | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Jest Tests", | |
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js", | |
"args": ["-i"], |
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
brew uninstall mongodb | |
brew tap mongodb/brew | |
brew install mongodb-community | |
# se vocês rodam o mongo sempre que ligam o mac rodem o comando a baixo também | |
# auto start service on login | |
brew services start mongodb-community | |
credits :twitter: @arthurdandrea |
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
const fetchPayloadFrom = async response => { | |
if (response.status >= 200 && response.status < 300) { | |
const json = await response.json(); | |
return json; | |
} else { | |
const bodyResp = await response.text(); | |
const error = new Error(bodyResp); | |
error.status = response.status; | |
error.statusText = response.statusText; | |
throw error; |
OlderNewer