alias xcbuild=$(xcode-select -p)/../SharedFrameworks/XCBuild.framework/Versions/A/Support/xcbuild
# THIS DOESNT WORK YET: xcbuild openIDEConsole # … then switch to Xcode ➡️
xcbuild showSpecs
xcbuild build <foo.pif> [—target <target>]
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
| /* | |
| FREE TO USE! COPY AND PASTE INTO YOUR PROJECT. TELL YOUR FRIENDS ABOUT MAPPABLE TYPES! | |
| How to use: | |
| install dependencies (tree shakable): | |
| `yarn add fp-ts ts-toolbelt normalizr` | |
| Your schema definitions should look like this: |
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
| { | |
| "explorer.experimental.fileNesting.enabled": true, | |
| "explorer.experimental.fileNesting.patterns": { | |
| "*.ts": "$(capture).js, $(capture).d.ts, $(capture).test.ts", | |
| "*.js": "$(capture).js.map, $(capture).min.js, $(capture).d.ts, $(capture).test.js", | |
| "*.jsx": "$(capture).js", | |
| "*.tsx": "$(capture).ts, $(capture).*.ts, $(capture).*.tsx", | |
| "tsconfig.json": "tsconfig.*.json", | |
| "docker-compose.yml": "docker-compose.*.yml", | |
| ".env": ".env.*", |
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, useState } from 'react' | |
| import { AccessibilityInfo } from 'react-native' | |
| // Adapted from https://github.com/infiniteluke/react-reduce-motion/blob/master/src/targets/native/index.js | |
| export const useReduceMotion = (): boolean => { | |
| const [shouldReduceMotion, setShouldReduceMotion] = useState(false) | |
| useEffect(() => { | |
| const handleChange = (isReduceMotionEnabled: boolean): void => { | |
| setShouldReduceMotion(isReduceMotionEnabled) |
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
| #!/bin/bash | |
| infile="TestClipTwoMin.mp4" | |
| datafile="TestClipTwoMinData.csv" | |
| crfs=("18" "19" "20" "21" "22" "23" "24" "25" "26" "27") | |
| presets=("ultrafast" "superfast" "veryfast" "faster" "fast" "medium" "slow" "slower" "veryslow") | |
| echo 'CRF,Preset,Time (Secs),Size (MB)' >> "$datafile" |
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
| type VersionChar = | |
| | '1' | '2' | '3' | '4' | '5'; | |
| type Char = | |
| | '0' | '1' | '2' | '3' | |
| | '4' | '5' | '6' | '7' | |
| | '8' | '9' | 'a' | 'b' | |
| | 'c' | 'd' | 'e' | 'f'; | |
| type Prev<X extends number> = |
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 { ColorSchemeName, Platform, StyleSheet, ViewStyle } from 'react-native'; | |
| // AFAIK, Android has a problem with negative margins. | |
| type RhythmSize = 'XXS' | 'XS' | 'Sm' | '' | 'Lg' | 'XL' | 'XXL'; | |
| type RhythmProp = | |
| | `${ | |
| | 'm' | |
| | 'p' | |
| | `${'m' | 'p'}${'l' | 'r' | 't' | 'b' | 'v' | 'h'}`}${RhythmSize}` | |
| | `${'w' | 'h' | `${'max' | 'min'}${'W' | 'H'}`}${RhythmSize}` |
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 { pipe } from 'fp-ts/function'; | |
| import { lens } from 'monocle-ts'; | |
| import { memo, useLayoutEffect, useRef, useState } from 'react'; | |
| import { LayoutChangeEvent, Text, View } from 'react-native'; | |
| import { useTheme } from '../contexts/ThemeContext'; | |
| const isOverflown = ({ | |
| clientWidth, | |
| clientHeight, | |
| scrollWidth, |
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
| // Adapted from http://lukajcb.github.io/blog/functional/2018/01/03/optimizing-tagless-final.html | |
| import { Applicative, Applicative1 } from 'fp-ts/lib/Applicative' | |
| import { Apply, Apply1, Apply2C, applySecond, liftA4 } from 'fp-ts/lib/Apply' | |
| import * as array from 'fp-ts/lib/Array' | |
| import * as const_ from 'fp-ts/lib/Const' | |
| import { HKT, Type, Type2, URIS, URIS2 } from 'fp-ts/lib/HKT' | |
| import { IO, io, URI as IOURI } from 'fp-ts/lib/IO' | |
| import { Option, some } from 'fp-ts/lib/Option' | |
| import { getProductSemigroup, Semigroup } from 'fp-ts/lib/Semigroup' |