Add the following line
auth       sufficient     pam_tid.so
immediately after
auth       sufficient     pam_smartcard.so
in the /private/etc/pam.d/sudo file.
| with sample_numbers (nr) as ( | |
| values (1),(11),(100) | |
| ) | |
| select to_char(nr, 'fm000') | |
| from sample_numbers; | |
| /* | |
| Example output: | |
| to_char | 
| <!-- | |
| ref: https://github.com/icerockdev/moko-resources | |
| Often strings contain text that should not be translated into other languages. | |
| Common examples might be a piece of code, a placeholder for a value, a special | |
| symbol, or a name. As you prepare your strings for translation, look for and | |
| mark text that should remain as-is, without translation, so that the translator | |
| doesn't change it. | 
| #!/bin/bash | |
| // This script can be used to install Homebrew both both MacOS | |
| // architectures when run on an M1+ Mac. | |
| //Install the ARM version | |
| arch -arm64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
| // Install the Intel version | |
| arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | 
Add the following line
auth       sufficient     pam_tid.so
immediately after
auth       sufficient     pam_smartcard.so
in the /private/etc/pam.d/sudo file.
| /** | |
| * Creates a frozen "enumeration" | |
| * @see https://masteringjs.io/tutorials/fundamentals/enum | |
| * @example createEnum(['Up', 'Down', 'Left', 'Right']) returns { Up: 'Up', Down: 'Down', Left: 'Left', Right: 'Right' } | |
| * @param values Array of items with which to create enum | |
| * @returns {Readonly<{}>} | |
| */ | |
| export function createEnum(values) { | |
| const enumObject = {}; | |
| for (const val of values) { | 
| #!/bin/bash | |
| # Copy something to your Mac clipboard. This script will paste it into | |
| # a focused text field in the Android emulator. | |
| # As always, you could also create an alias for the command or just | |
| # run it manually. | |
| adb shell input text `pbpaste` | 
| #!/bin/zsh -l | |
| # This script can easily be added to your crontab for scheduled backups. | |
| # | |
| # EXITS | |
| SUCCESS=0 | |
| BUNDLE_FAILED=1 | |
| BACKUP_FILE_EXISTS=2 | |
| MOVE_FAILED=3 | |
| NO_HOMEBREW=4 | 
| // yarn add react-native-extra-dimensions-android | |
| const {Platform, Dimensions} = require('react-native'); | |
| const deviceHeight = | |
| Platform.OS === 'ios' | |
| ? Dimensions.get('window').height | |
| : require('react-native-extra-dimensions-android').get('REAL_WINDOW_HEIGHT'); | 
| /* | |
| While working on a Kotlin Multiplatform project, I needed to examine | |
| the HTTP response code when a call to the GraphQL server fails. | |
| ApolloGraphQL server will always return HTTP 200, regardless of whether | |
| the query failed or succeeded on the GraphQL server. | |
| There are often cases where errors may occur before the GraphQL server | |
| is accessed. An example would be redirects (300–399), client errors (400–499), etc. | |
| */ | 
| import DeviceInfo from 'react-native-device-info' | |
| isSimulator() { | |
| // https://github.com/react-native-community/react-native-device-info#isemulator | |
| return DeviceInfo.isEmulator(); | |
| }, | |
| // Found in https://stackoverflow.com/a/35529545 |