Skip to content

Instantly share code, notes, and snippets.

View omenking's full-sized avatar
🏠
Working from home

Andrew Brown omenking

🏠
Working from home
View GitHub Profile
@omenking
omenking / 5.21-clicando-em-elementos.py
Created January 13, 2024 00:16 — forked from eliasalbuquerque/5.21-clicando-em-elementos.py
Curso Dev Aprender | Jhonatan de Souza
# 202401 - Python 3.12.0
# MA_5-21 - 2 Maneiras de clicar em um elemento
import logging
import traceback
from time import sleep
from app import iniciar_driver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
@omenking
omenking / guide.md
Last active December 31, 2023 18:12
Using sfsshell to format and partition 2TB Harddrive for soft modding PS2.

Step 1

Ensure your drive has no partitions.

Open up Disk Management and ensure the Disk is unallocated.

Step 2

Get device name. We'll need to this to select the device.

@omenking
omenking / task-definition.guard
Created April 22, 2023 17:25
task-definition.guard
aws_ecs_cluster_configuration {
rules = [
{
rule = "task_definition_encryption"
description = "Ensure task definitions are encrypted"
level = "error"
action {
type = "disallow"
message = "Task definitions in the Amazon ECS cluster must be encrypted"
}
@omenking
omenking / env0-assume-role.md
Created August 11, 2022 16:06
Env0 Assume Role
AWSTemplateFormatVersion: '2010-09-09'
Parameters:
  ExternalId:
    Type: String
    Default: external-id
Resources:
  AssumeRole:
    Type: AWS::IAM::Role
    Properties: 
@omenking
omenking / gist:f7e3a45d74c41a17b9ca9048c5c7ba84
Last active August 11, 2022 14:10
GoogleClout Challenge 5/10
export SA=web-admin-sa@qwiklabs-gcp-01-471593c9d915.iam.gserviceaccount.com
export DBK=gs://qwiklabs-gcp-01-471593c9d915-startup
export SBK=gs://web-startup-tjyjd
export NM=deploy-web-server.sh
export WB=web-instance
gcloud config set project qwiklabs-gcp-01-471593c9d915
gsutil -i $SA mb $DBK
gsutil -i $SA cp $SBK/$NM $DBK
[Container] 2022/06/11 16:28:36 Waiting for agent ping
[Container] 2022/06/11 16:28:37 Waiting for DOWNLOAD_SOURCE
[Container] 2022/06/11 16:28:38 Phase is DOWNLOAD_SOURCE
[Container] 2022/06/11 16:28:38 CODEBUILD_SRC_DIR=/codebuild/output/src926578000/src
[Container] 2022/06/11 16:28:38 YAML location is /codebuild/output/src926578000/src/copilot/pipelines/fargate-pilot-main/buildspec.yml
[Container] 2022/06/11 16:28:38 Processing environment variables
[Container] 2022/06/11 16:28:38 Selecting 'docker' runtime version '19' based on manual selections...
[Container] 2022/06/11 16:28:38 Selecting 'ruby' runtime version '2.6' based on manual selections...
[Container] 2022/06/11 16:28:38 Running command echo "Specifying docker version in buildspec is deprecated. Using docker $DOCKER_VERSION"
Specifying docker version in buildspec is deprecated. Using docker 20.10.15
@omenking
omenking / appspec.yml
Created June 2, 2022 15:25
appspec yml for ecs
version: 0.0
Resources:
- TargetService:
Type: AWS::ECS::Service
Properties:
TaskDefinition: "arn:aws:ecs:us-east-1:982383527471:task-definition/rails-example:4"
LoadBalancerInfo:
ContainerName: "rails-example"
ContainerPort: 3000
@omenking
omenking / startrek.csv
Created May 5, 2022 16:06
This is a list of star trek ships
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 5.
name,registry,ship_class,description
USS Defiant,NCC-75633,Defiant,Formerly the USS São Paulo. Assigned to space station Deep Space Nine. Participates in the Battle of Cardassia.
SS Vico,NAR-18834,Oberth,"Research vessel that was in service with Starfleet in the mid-24th century. This ship was on loan to a civilian agency, and was given a civilian registry. Vico operated out of Starbase 514. In 2368, the Vico explored an astronomical formation known as a black cluster. Found derelict by Enterprise-D."
USS Raven,NAR-32450,Undetermined,Science and exploration vessel used by the Hansens for exploration of the Delta Quadrant where Seven of Nine was assimilated by the Borg.
USS YorktownUSS Enterprise (from 2286),NCC 1717,Constitution refit,"Disabled by whale probe, then possibly salvaged and renamed Enterprise; although no onscreen evidence supports this. Command given to James T. Kirk following his demotion to Captain. Primary setting for Star Trek V: The Final Frontier and Star Trek VI: The Undiscovered Country,
@omenking
omenking / gitpod_to_rds.rb
Created January 26, 2022 16:46
Gitpod to RDS
require 'aws-sdk-ec2'
require 'pry'
class GitpodToRds
def self.run sg_id:, ip_protocol:, from_port:, to_port:, description:, ip_address:
raise "ip address must not be blank" if ip_address.nil?
cidr_ip_range = "#{ip_address}/32"
client = GitpodToRds.ec2_client
sg = GitpodToRds.describe_security_group client: client, sg_id: sg_id
@omenking
omenking / gist:750029716ee9074eeb412bb379c4c324
Created February 27, 2021 15:04
AWS Support + CrossAccount CodeCommit Https Git Credentials in CodeBuild Project
I am attempting to install packages for NodeJS that reference a CodeCommit repository that resides in different AWS Account from a different AWS Organization.
I am receive the error "unable to access"
===========================
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t https://git-codecommit.us-east-1.amazonaws.com/v1/repos/my_package
npm ERR!
npm ERR! fatal: unable to access 'https://git-codecommit.us-east-1.amazonaws.com/v1/repos/my_package/ ': The requested URL returned error: 403
===========================