Help with SQL commands to interact with a MySQL database
- Mac /usr/local/mysql/bin
- Windows /Program Files/MySQL/MySQL version/bin
- Xampp /xampp/mysql/bin
| import { Action } from "redux"; | |
| import { ActionsObservable, Epic, StateObservable } from "redux-observable"; | |
| import { TestScheduler } from "rxjs/testing"; | |
| const assertDeepEquals = (actual: any, expected: any) => { | |
| expect(actual).toEqual(expected); | |
| }; | |
| export const marbleTest = <T extends Action, O extends T = T, S = void, D = any>({ | |
| epic, |
| function adb_connect { | |
| # PORT used to connect. Default: 5555 | |
| PORT=${1:-5555} | |
| # IP address from current device connected | |
| IP_ADDRESS=`adb shell ip route | awk '{print $9}'` | |
| echo "ADB connect to $IP_ADDRESS on port $PORT" | |
| # Change connection from usb to tcpip using $PORT |
package.jsonyarn install to upgrade dependenciesyarn outdated or yarn upgrade-interactive libraries that are outdated (make sure that there's no breaking changes, check release notes (one by one))| 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="[email protected]" my project |
| module.exports = { | |
| schema: './data/schema.graphql', | |
| language: 'typescript', | |
| src: '../.', | |
| include: [ | |
| './web/src/**', | |
| './shared/src/**', | |
| ], | |
| }; |
| import { PixelRatio, Dimensions } from "react-native"; | |
| const isTabletLike = () => { | |
| const pixelDensity = PixelRatio.get(); | |
| const adjustedWidth = Dimensions.get("screen").width * pixelDensity; | |
| const adjustedHeight = Dimensions.get("screen").height * pixelDensity; | |
| return ( | |
| (pixelDensity < 2 && (adjustedWidth >= 1000 || adjustedHeight >= 1000)) || | |
| (pixelDensity === 2 && (adjustedWidth >= 1920 || adjustedHeight >= 1920)) | |
| ); |
| import idx from 'idx'; | |
| import { ForwardFeature } from './mapboxTypes'; | |
| export interface AddressResult { | |
| id?: string | null; | |
| fullAddress?: string | null; | |
| shortAddress?: string | null; | |
| zipcode?: string | null; | |
| street?: string | null; |
tips to evolve as a developer
developers get stuck, paralized
https://www.oreilly.com/library/view/apprenticeship-patterns/9780596806842/ch04.html
Make It Stick https://www.amazon.com.br/Make-Stick-Science-Successful-Learning/dp/0674729013
| const graphiqlBrandingTweak = { | |
| ["postgraphile:graphiql:html"](html: string) { | |
| console.log("Applying GraphiQL Branding Tweak..."); | |
| return html.replace( | |
| "</head>", | |
| `<style type="text/css"> | |
| @media (prefers-color-scheme: dark) { | |
| html { | |
| filter: invert(1) hue-rotate(180deg); | |
| } |