This file contains 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 strict"; | |
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: 'stable', | |
// default font size in pixels for all tabs |
This file contains 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
# Envs | |
TFE_TOKEN = os.environ['TFE_TOKEN'] | |
TFE_API_ENDPOINT_BASE = os.environ['TFE_API_ENDPOINT_BASE'] | |
# Set request header for authentication | |
HEADERS = { 'Authorization' : 'Bearer ' + TFE_TOKEN } | |
# Switch for ssl | |
VERIFY = False |
This file contains 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
import logging | |
import os | |
LOG_LEVEL = os.getenv('LOG_LEVEL', 'INFO').lower() | |
log_level_map = { | |
"info": logging.INFO, | |
"debug": logging.DEBUG, | |
"warning": logging.WARNING, | |
"error": logging.ERROR, |
This file contains 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
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
tfe "github.com/hashicorp/go-tfe" | |
) |
This file contains 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/env bash | |
usage() { | |
echo "****************************************************" | |
echo "" | |
echo "Usage: $0 <env> [nonprod|prod]" | |
echo "" | |
echo "****************************************************" |
This file contains 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
from pathlib import Path | |
# Set the path to 'downloads' directory | |
downloads = Path.home() / "downloads" | |
# File endings for different types | |
pictures = ['.jpg', '.png', '.gif', '.JPG', '.jpeg'] | |
media = ['.mp3', '.avi', '.mp4'] | |
documents = ['.pdf', '.doc', '.docx', '.txt', '.xls', '.xlsx'] | |
compressedFiles = ['.rar', '.zip'] |
This file contains 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
import logging | |
import colorlog | |
def get_logger(name): | |
# Create a custom logger | |
logger = logging.getLogger(name) | |
# Create handlers |
This file contains 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
def transformTags(tags): | |
"""Transforms the provided dictionary into a suitable array for applying within boto3. | |
E.g. tags ={'myTag': '1234'} will be transformed to [{'key': 'myTag, 'value:','1234'}]. | |
Args: | |
tags: A dictionary with tags. | |
Returns: | |
List with [{'key': 'tagKey, 'value:','tagValue'}]. |