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
vpc="vpc-01c4ba22f251d0831" | |
aws ec2 describe-internet-gateways --filters 'Name=attachment.vpc-id,Values='$vpc | grep InternetGatewayId | |
aws ec2 describe-subnets --filters 'Name=vpc-id,Values='$vpc | grep SubnetId | |
aws ec2 describe-route-tables --filters 'Name=vpc-id,Values='$vpc | grep RouteTableId | |
aws ec2 describe-network-acls --filters 'Name=vpc-id,Values='$vpc | grep NetworkAclId | |
aws ec2 describe-vpc-peering-connections --filters 'Name=requester-vpc-info.vpc-id,Values='$vpc | grep VpcPeeringConnectionId | |
aws ec2 describe-vpc-endpoints --filters 'Name=vpc-id,Values='$vpc | grep VpcEndpointId | |
aws ec2 describe-nat-gateways --filter 'Name=vpc-id,Values='$vpc | grep NatGatewayId | |
aws ec2 describe-security-groups --filters 'Name=vpc-id,Values='$vpc | grep GroupId | |
aws ec2 describe-instances --filters 'Name=vpc-id,Values='$vpc | grep InstanceId |
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
import openai | |
openai.api_key = "TOKEN" | |
completion = openai.ChatCompletion.create( | |
model="gpt-3.5-turbo", | |
messages=[{"role": "user", "content": "Reply as a Vedic Scholar."}] | |
) | |
print(completion) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Kids Tic Tac Toe</title> | |
<style> | |
body { | |
background-color: #FFD700; | |
font-family: Arial, sans-serif; | |
text-align: center; | |
} |
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
import csv | |
from bs4 import BeautifulSoup | |
def extract_first_image_url(html_string): | |
soup = BeautifulSoup(html_string, 'html.parser') | |
img_tag = soup.find('img') | |
if img_tag: | |
img_url = img_tag.get('src') |
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/bash | |
# Create some directories and files | |
mkdir -p /var/www/html | |
mkdir -p /var/backups | |
mkdir -p /etc/company | |
# Create users and groups | |
groupadd webadmin | |
useradd -m -G webadmin alice |
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
/* CSS for overriding styles with high specificity */ | |
h3#problem-description, | |
h3#problem-constraints, | |
h3#input-format, | |
h3#output-format, | |
h3#example-input, | |
h3#example-output { | |
font-family: Arial, sans-serif !important; | |
color: #2b2b2b !important; | |
font-size: 1.5rem !important; |
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx-deployment-dojo | |
labels: | |
app: ng-dep-dojo | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: |
OlderNewer