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
| # Use Google Cloud Platform stackdriver with python structlog | |
| from google.cloud.logging import Client | |
| from google.cloud.logging import _helpers | |
| from google.cloud.logging.handlers import CloudLoggingHandler | |
| from google.cloud.logging.handlers.transports.background_thread import _Worker | |
| # pip install python-json-logger | |
| from pythonjsonlogger import jsonlogger |
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
| $ brew remove git | |
| $ brew remove curl | |
| $ brew install openssl | |
| $ brew install --with-openssl curl | |
| $ brew install --with-brewed-curl --with-brewed-openssl git |
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
| # In Chef, when a resource is defined all its variables are evaluated during | |
| # compile time and the execution of the resource takes place in converge phase. | |
| # So if the value of a particular attribute is changed in converge | |
| # (and not in compile) the resource will be executed with the old value. | |
| # Example problem: | |
| # Let's consider this situation where there are two steps involved in a recipe | |
| # Step 1 is a Ruby block that changes a node attribute. Rubyblocks get executed | |
| # in converge phase | |
| # Step 2 is a Chef resource that makes use of the node attribute that was |
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
Show hidden characters
| [ | |
| { "keys": ["ctrl+shift+x"], "command": "tidy_xml" }, | |
| { "keys": ["ctrl+shift+j"], "command": "prettify_json" } | |
| ] |
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/sh | |
| echo "Purging pyc files and empty directories..." | |
| # Start from the repository root. | |
| cd ./$(git rev-parse --show-cdup) | |
| # Delete .pyc files and empty directories. | |
| find . -name "*.pyc" -delete 2>&1 > /dev/null & | |
| find . -type d -empty -delete 2>&1 > /dev/null & |