Skip to content

Instantly share code, notes, and snippets.

View diepes's full-sized avatar

Pieter diepes

  • 05:59 (UTC +12:00)
View GitHub Profile
@vishnuhd
vishnuhd / docker-desktop-k8s-local-image.md
Created August 22, 2019 13:17
Reference local images in Docker for Mac - Kubernetes

Reference local images in Docker for Mac - Kubernetes

To run a local baked docker image in docker for mac kubernetes set the imagePullPolicy to Never.

For example:

apiVersion: v1
kind: Pod
metadata:
 name: local-image-test
import boto3
# create client for ec2 service and pass aws_access_key_id and aws_secret_access_key as parameter
client = boto3.client('ec2', region_name='us-east-1', aws_access_key_id= 'AWS_ACCESS_KEY_ID',
aws_secret_access_key= 'AWS_SECRET_ACCESS_KEY' )
# create a dictionary with names of databases or instances as key and their volume ids as value
volumes_dict = {
'database-1' : 'volume-id-1',
'database-2' : 'volume-id-2',
'database-3' : 'volume-id-3',
@aljgom
aljgom / rename_files.py
Last active May 24, 2023 02:35
Renames files in current directory by passing it functions. First determines the changes that will be made and displays the differences using colors, and asks for confirmation to perform the changes. Works on pycharm, haven't tested it in different consoles
import time
import os
import select
import re
import difflib
from itertools import zip_longest
import __main__
# os.chdir("enter path here")