Skip to content

Instantly share code, notes, and snippets.

View FernandoCutire's full-sized avatar
🙌
Just do it !

Fernando Cutire FernandoCutire

🙌
Just do it !
View GitHub Profile
@FernandoCutire
FernandoCutire / check_emr_clusters.py
Last active July 18, 2024 18:50
This will let you check emr active clusters
import boto3
import csv
from io import StringIO
def get_running_emr_clusters(region):
"""
Fetches the IDs of EMR clusters that are currently running in the specified region.
Parameters:
- region (str): AWS region where the EMR clusters are located.
@FernandoCutire
FernandoCutire / rename_redshift_table.sql
Last active July 15, 2024 18:21
rename redshift table using sql command
-- Assuming your existing table is named 'old_table'
-- and you want to rename it to 'new_table'
ALTER TABLE old_table RENAME TO new_table;
@FernandoCutire
FernandoCutire / unload_redshift.sql
Last active July 12, 2024 18:40
Unload the data from a redshift table to an s3 path
UNLOAD ('SELECT * FROM your_redshift_table')
TO 's3://your-bucket/path/to/export/'
IAM_ROLE 'arn:aws:iam::your-account-id:role/your-redshift-role'
FORMAT AS PARQUET;
@FernandoCutire
FernandoCutire / index.html
Last active July 18, 2024 18:56
simple html apache site
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Topicos Site is Online</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "West Europe"
}
resource "azurerm_template_deployment" "example" {
name = "acctesttemplate-01"
resource_group_name = azurerm_resource_group.example.name
template_body = <<DEPLOY
@FernandoCutire
FernandoCutire / Change the presentation page in php app
Last active June 27, 2022 02:50
Change the first file in php app
# Página de Inicio Alternativa
DirectoryIndex resources/views/inicio/inicio.php index.php index.html
@FernandoCutire
FernandoCutire / Inicio
Last active June 21, 2022 03:09
Descripción de el parcial #1 de Seguridad Informática Enlace del tutorial: https://backtrackacademy.com/articulo/implementacion-de-modsecurity-en-contenedor-de-wordpress
# Parcial #1 Seguridad Informática
Documento de trabajo: https://utpac-my.sharepoint.com/:w:/g/personal/gabriel_diaz4_utp_ac_pa/ER66HkSPe39Ji9bUathyXYYBSW-ayDjhpjfvWMi_6OEhAw
Integrantes
- Fernando Cutire
- Gabriel Díaz
- Jonathan Gamero
<form action="language_switcher.php" method="post">
<select name="lang">
<option value="en"<?php if( $_COOKIE["language"] == "en" ) { echo " selected"; } ?>>English</option>
<option value="ru"<?php if( $_COOKIE["language"] == "ru" ) { echo " selected"; } ?>>Russian</option>
</select>
<input type="submit" value="Select Language">
</form>
<p>Language: <?php if( isset( $_COOKIE["language"] ) ) { echo $_COOKIE["language"]; } else { echo "<em>not set</em>"; } ?></p>
We couldn’t find that file to show.