Skip to content

Instantly share code, notes, and snippets.

View myHerbDev's full-sized avatar
🎸
myHerb Happening

myHerb myHerbDev

🎸
myHerb Happening
View GitHub Profile
@myHerbDev
myHerbDev / aws-eco-runner.yml
Created November 4, 2024 15:35
AWS Eco Runner is a solution designed to optimize the cost of using GitHub Actions runners
# Installation code.
- name: aws-eco-runner
# You may pin to the exact commit or the version.
# uses: nodesource/aws-eco-runner@625920a3e23912bd416b27296717326a93063812
uses: nodesource/[email protected]
with:
# Array with ID of the EC2 instance to start OR stop
instances_id:
# Define if I want to start or stop the runner
action: # default is start
@myHerbDev
myHerbDev / generative-ai-prompt-v1.txt
Last active June 24, 2024 18:20
Install the Google AI Python SDK - Generative AI Prompt
"""
Install the Google AI Python SDK
$ pip install google-generativeai
See the getting started guide for more information:
https://ai.google.dev/gemini-api/docs/get-started/python
"""
import os
import requests
# Get the URL of the website you want to check
url = "https://www.example.com"
# Make a request to the website
response = requests.get(url)
# Get the carbon footprint of the website
carbon_footprint = response.headers["X-Carbon-Footprint"]