Was created a class that inherit from ContextDecorator and implement methods __enter__() and __exit__() to
use as Python ContextManager
Based in:
| # Copy + paste the function below into your | |
| # ~/bash_profile or ~/.zshrc file | |
| # | |
| # Based in links below: | |
| # [](https://www.avanderlee.com/workflow/capture-ios-simulator-video-app-preview/) | |
| # [Error to find simctl](https://stackoverflow.com/questions/29108172/xcrun-unable-to-find-simctl) | |
| ## Starts recording the simulator. | |
| recsim() { | |
| echo -n "Use CTRL+C to stop recording"; |
| # This commands/functions bellow is to allow Cmake C++ projects to use GoogleTest library to TDD (unit tests) | |
| # The package gtest is compatible with built-in CMake targets: | |
| enable_testing() | |
| find_package(GTest CONFIG REQUIRED) | |
| target_link_libraries(main PRIVATE GTest::gtest GTest::gtest_main GTest::gmock GTest::gmock_main) | |
| add_test(AllTestsInMain main) |
| # ------ Android ------ | |
| # | |
| # Windows: %USERPROFILE%\AppData\Local\Android\Sdk | |
| # MacOS: $HOME/Library/Android/sdk | |
| export ANDROID_HOME=$HOME/Android/Sdk | |
| export JAVA_HOME=$HOME/<ANDROID_STUDIO_IDE_FOLDER>/jbr | |
| export PATH=$JAVA_HOME/bin:$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator |
Was created a class that inherit from ContextDecorator and implement methods __enter__() and __exit__() to
use as Python ContextManager
Based in:
| # Install required dependencies from setup.py "install_requires" param | |
| # Reference: https://caremad.io/posts/2013/07/setup-vs-requirement | |
| --index-url https://pypi.python.org/simple/ | |
| . |
| # Prerequisites | |
| *.d | |
| # Object files | |
| *.o | |
| *.ko | |
| *.obj | |
| *.elf | |
| # Linker output |
Unity Singleton Monobehaviour component, that can be attached to Game Objects. You can use SingletonPersistent to persist the instance among scenes
or just Singleton class to use the same instance on the only one scene.
AudioSource inside of an singleton)| using System.Collections.Generic; | |
| using UnityEngine; | |
| namespace AudioGame.UnityExtensions | |
| { | |
| public static class StringExtensions | |
| { | |
| public static Dictionary<string, string> BuildTemplateTokens(GameObject gameObject) |
| package com.example.services.timers.listeners | |
| /** | |
| * Functional interface to allow use SOLID [Interface segregation principle](https://en.wikipedia.org/wiki/Interface_segregation_principle) | |
| * from any Java class | |
| */ | |
| fun interface CancelListener { | |
| /** | |
| * "Event" triggered when [android.os.CountDownTimer.cancel] is called | |
| */ |
| [DebuggerDisplay("Count = {" + nameof(Count) + "}")] | |
| public sealed class TaskCompletionSourceDictionary | |
| { | |
| private readonly TaskCompletionSourceDictionary<Type> _dictionary = new TaskCompletionSourceDictionary<Type>(); | |
| public int Count => _dictionary.Count; | |
| public bool TryGetValue<T>(out TaskCompletionSource<T> taskCompletionSource) => | |
| _dictionary.TryGetValue(typeof(T), out taskCompletionSource); |