- Homebrew/terminal/bash
- OSX Productivity - Window Management/Quick Launcher/Hyperswitch
- OSX Settings - Dock/Finder
- Web Browser - Extensions - AdBlock, Privacy Badger, OneTab, JSONViewer, Stylus, Vue Devtools, React Devtools
- Node.js - nvm
- Code Editor - vs code
- Code Editor Extensions
- Break timer and Flux
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 fetch = (...args) => console.log(...args) // mock | |
| function httpRequest(url, method, data) { | |
| const init = { method } | |
| switch (method) { | |
| case 'GET': | |
| if (data) url = `${url}?${new URLSearchParams(data)}` | |
| break | |
| case 'POST': | |
| case 'PUT': | |
| case 'PATCH': |
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 { useEffect, useRef } from "react"; | |
| import { AppState, AppStateStatus } from "react-native"; | |
| export const useFetchOnAppForeground = () => { | |
| const listener = useRef(null); | |
| function fetchOnAppForeground(params) { | |
| if (AppState.currentState === "active") { | |
| return fetch(params); | |
| } else { |
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
| function App() { | |
| const data = Array(10).fill(0); | |
| const GAP = 5; | |
| const numColumns = 3; | |
| const { width } = Dimensions.get("window"); | |
| // Reduce the size to accomodate margin space by items | |
| const ITEM_SIZE = width / numColumns - ((numColumns - 1) * GAP) / numColumns; | |
| const renderItem = ({ index }) => { |
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 React, { useMemo, useState } from "react"; | |
| import { LayoutChangeEvent, StyleSheet } from "react-native"; | |
| import { | |
| PinchGestureHandler, | |
| PinchGestureHandlerGestureEvent, | |
| } from "react-native-gesture-handler"; | |
| import Animated, { | |
| useAnimatedGestureHandler, | |
| useAnimatedStyle, | |
| useSharedValue, |
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
| // VSCode Settings (hit `Cmd + ,` to open settings) | |
| { | |
| "editor.smoothScrolling": true, | |
| "editor.fontSize": 16, | |
| "editor.fontFamily": "Fira Mono, Consolas, 'Courier New', monospace", | |
| "editor.wordWrap": "on", | |
| "editor.tabCompletion": "on", | |
| "explorer.openEditors.visible": 0, | |
| "explorer.autoReveal": false, |
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
| // Expo SDK41 | |
| // expo-blur: ~9.0.3 | |
| import React, { useRef } from 'react'; | |
| import { | |
| Animated, | |
| Image, | |
| ImageBackground, | |
| ScrollView, | |
| StatusBar, |
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
| function paginate(array, page_size, page_number) { | |
| // human-readable page numbers usually start with 1, so we reduce 1 in the first argument | |
| return array.slice((page_number - 1) * page_size, page_number * page_size); | |
| } | |
| console.log(paginate([1, 2, 3, 4, 5, 6], 2, 2)); | |
| console.log(paginate([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], 4, 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
| const FakeComponent = () => { | |
| return ( | |
| <AnimatedRoutes exitBeforeEnter initial={false}> | |
| <RouteTransition exact path="/some-route"> | |
| <NewUsers /> | |
| </RouteTransition> | |
| <RouteTransition exact path="/yo" > | |
| <Users /> | |
| </RouteTransition> | |
| </AnimatedRoutes> |
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
| xcode-select --install | |
| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| brew update | |
| brew cask install iterm2 | |
| # update iterm2 settings -> colors, keep directory open new shell, keyboard shortcuts | |
| brew install bash # latest version of bash | |
| # set brew bash as default shell | |
| brew install fortune | |
| brew install cowsay | |
| brew install git |
NewerOlder