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
| // helper script for generating an `npm install` command for packages chagnes when @rnx-kit/align-deps is bad | |
| // given example for: | |
| // https://react-native-community.github.io/upgrade-helper/?from=0.82.1&to=0.83.4 | |
| const packages = { | |
| // copy & paste from https://react-native-community.github.io/upgrade-helper's package.json green lines | |
| // following example from https://react-native-community.github.io/upgrade-helper/?from=0.82.1&to=0.83.4 | |
| // HEY YOU! |
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
| // usage: | |
| // await experiment( "getFreeDiskStorage", DeviceInfo.getFreeDiskStorage ) | |
| const times = 1000; | |
| const experiment = async ( label:string, func: () => Promise<unknown> ) => { | |
| let firstTime = 0; | |
| let firstTenTimesSum = 0; | |
| let sum = 0; | |
| // eslint-disable-next-line no-plusplus | |
| for ( let index = 0; index < times; 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
| ffmpeg -i video.mp4 -i metadata.txt -map_metadata 1 -codec copy video_with_metadata.mp4 |
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 node | |
| console.log(`Cow says: ${process.argv[2] || 'moo'}`) |
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
| // tired | |
| if (node.Expression is IdentifierNameSyntax) | |
| { | |
| // node.Expression.Identifier.Dump(); <- `Does not contain a definition for "Identifier"` | |
| var id = (IdentifierNameSyntax)node.Expression; | |
| id.Identifier.Dump(); | |
| } | |
| // wired | |
| if (node.Expression is IdentifierNameSyntax id) |
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
| // By RoslynQuoter - source code at: https://github.com/KirillOsenkov/RoslynQuoter | |
| SyntaxFactory.CompilationUnit() | |
| .WithMembers( | |
| SyntaxFactory.SingletonList<MemberDeclarationSyntax>( | |
| SyntaxFactory.GlobalStatement( | |
| SyntaxFactory.ExpressionStatement( | |
| SyntaxFactory.InvocationExpression( | |
| SyntaxFactory.MemberAccessExpression( | |
| SyntaxKind.SimpleMemberAccessExpression, |
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
| version: 2.1 | |
| executors: | |
| expo_turtle_android_executor: | |
| docker: | |
| - image: my/private/registry/expo-turtle-android:turrrrrtle | |
| working_directory: /home/circleci/expo-project | |
| environment: | |
| GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"' | |
| android_executor: |
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
| void Main() | |
| { | |
| var words = new List<string>(); | |
| Exclaimer exclaimer = null; | |
| var exclaimedWords = words.Select(a => exclaimer.Exclaimify(a)).ToList(); | |
| var moarExclaimedWords = words.Select(exclaimer.Exclaimify).ToList(); | |
| } | |