Skip to content

Instantly share code, notes, and snippets.

View devashishpatil56's full-sized avatar

Devashish Patil devashishpatil56

View GitHub Profile
#mysql-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: wordpress-mysql
labels:
app: wordpress
spec:
selector:
matchLabels:
import os
import psycopg2
from psycopg2 import Error
import psycopg2.extras
from psycopg2.extras import RealDictCursor
try:
# connect to the database
connection = psycopg2.connect(host=os.environ['db_endpoint'],
def createStack():
return []
def isEmpty(stack):
if len(stack)==0:
return True
else:
return False
def push(stack, element):
list_1 = ["a", "b", "c", "d"]
list_2 = [1, 2, 3, 4]
dict_from_lists = dict(zip(list_1, list_2))
# dict_from_lists will be {'a': 1, 'b': 2, 'c': 3, 'd': 4}
$path = "Path\to\your\ssh_key.pem"
#Get current ACL to file/folder
$acl = Get-Acl $path
#Disable inheritance and remove inherited permissions
$acl.SetAccessRuleProtection($true,$false)
#Remove all explict ACEs
$acl.Access | ForEach-Object { $acl.RemoveAccessRule($_) }
pip3 install django-storages