-
: execludes a term.
Search for Elon Musk but exclude the terms tesla or SpaceX
elon musk -tesla -SpaceX
|
: search for x or y.
Search for apples or oranges (see images)
fruits(apple | orange)
name: Remove old versions of Google App Engine | |
##### | |
# | |
# Add this file to .github/workflows/delete-old-gae.yml then GitHub Actions will remove old versions of Google App Engine. | |
# | |
##### | |
on: | |
workflow_dispatch: |
class SuppressExceptionsDecorator: | |
"""Decorator for temporarily suppressing specified exceptions. | |
Exception suppression is limited to the function execution. | |
Example: | |
```python | |
import warnings | |
@SuppressErrorsDecorator(MyException) | |
def foo(): |
# Get value on variable in .env file | |
cat .env | grep $VAR_NAME | sed 's/.*=//' |
# Get current speed | |
defaults read -g com.apple.mouse.scaling | |
# Set speed (maximum of 7.0) | |
defaults write -g com.apple.mouse.scaling 5.0 |
# Clear cache | |
poetry cache clear _default_cache --all | |
poetry cache clear pypi --all |
# Install Poetry 1.2 | |
mamba install -c "conda-forge/label/cleo_dev" cleo | |
mamba install -c "conda-forge/label/poetry_dev" poetry=1.2 |
# Backup environment to file | |
conda env export --channel $ENV_NAME --file "$FILE_PATH.yaml" | |
# Clone conda env | |
conda create --name myclone --clone root |
# Run the following command: | |
# `gcloud iam roles create my_project.deployer --project $PROJECT_ID --file role.yaml` | |
# | |
# Use `my.custom.role` (dot-separated format) as role ID for consistency. | |
# See: https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles | |
# role.yaml | |
title: My Custom Role |
# Extracted using: $ unzip -p lib/pycharm.jar com/jetbrains/python/PyBundle.properties | grep -B1 INSP.NAME | grep '^#' | sed 's|Inspection||g' | sed -e 's|#\s\{,1\}|# noinspection |' | |
# noinspection PyPep8 | |
# noinspection PyPep8Naming | |
# noinspection PyTypeChecker | |
# noinspection PyAbstractClass | |
# noinspection PyArgumentEqualDefault | |
# noinspection PyArgumentList | |
# noinspection PyAssignmentToLoopOrWithParameter | |
# noinspection PyAttributeOutsideInit |