✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨
SUPPORT MY WORK - Everything Helps Thanks
YouTube 🔗 https://YouTube.GetMeTheGeek.com
Buy Me a Coffee ☕ https://www.buymeacoffee.com/getmethegeek
Hire US 🔗 https://getmethegeek.com
Digital Ocean referral 🔗 https://tiny.cc/plxdigitalocean
✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨
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
#!/usr/bin/env ruby | |
require "fileutils" | |
class Package | |
FILTERED_PARTS = %w[rpm x86_64] | |
INSTALL_SECTIONS = %w[pre_install post_install pre_upgrade | |
post_upgrade pre_remove post_remove].freeze |
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
### Overview ### | |
In order to replicate from an AWS RDS database to an external server, you need 3 components, and to keep two things in mind: | |
**Components** | |
* RDS Master DB - `rds-master` | |
* RDS Read-Only Slave - `rds-slave` | |
* External DB Server - `external-db` | |
**Two Things to Keep in Mind** | |
* This process is fairly brittle and not fully supported by AWS except for temporary data extraction. |
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
<?php | |
ini_set('default_socket_timeout', 5); | |
while (true) { | |
$array = explode("\n", str_replace("\r","",file_get_contents("target.txt"))); | |
foreach ($array as $a){ | |
if(!empty(trim($a))){ | |
$t = explode(" ", $a); | |
upload($t[0], $t[1]); | |
} |
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
# Deploy a Compute Instance with a Remote Startup Script | |
# https://google.qwiklabs.com/focuses/1735?parent=catalog | |
# Task 1: Confirm that a Google Cloud Storage bucket exists that contains a file | |
gsutil mb gs://$DEVSHELL_PROJECT_ID | |
gsutil cp gs://sureskills-ql/challenge-labs/ch01-startup-script/install-web.sh gs://$DEVSHELL_PROJECT_ID | |
# Task 2: Confirm that a compute instance has been created that has a remote startup script called install-web.sh configured | |
gcloud compute instances create example-instance --zone=us-central1-a --tags=http-server --metadata startup-script-url=gs://$DEVSHELL_PROJECT_ID/install-web.sh |
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
###################################################################################### | |
## Set Up and Configure a Cloud Environment in Google Cloud: Challenge Lab # GSP321 ## | |
###################################################################################### | |
====================== TASK 1: Create development VPC manually ====================== | |
gcloud compute networks create griffin-dev-vpc --subnet-mode custom | |
gcloud compute networks subnets create griffin-dev-wp --network=griffin-dev-vpc --region us-east1 --range=192.168.16.0/20 |
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
###################################################################################### | |
## Automating Infrastructure on Google Cloud with Terraform: Challenge Lab # GSP345 ## | |
###################################################################################### | |
====================== Setup : Create the configuration files ====================== | |
Make the empty files and directories in Cloud Shell or the Cloud Shell Editor. | |
------------------------------------------------------------------------------------ | |
touch main.tf | |
touch variables.tf |
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
package main | |
import ( | |
"errors" | |
"github.com/streadway/amqp" | |
"log" | |
"os" | |
"time" | |
) |
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
package base | |
import ( | |
"errors" | |
"fmt" | |
"github.com/manucorporat/try" | |
"github.com/simpleton/beego" | |
"github.com/streadway/amqp" | |
"math/rand" | |
"model/helper" |
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
# -*- encoding: utf-8 -*- | |
# requires a recent enough python with idna support in socket | |
# pyopenssl, cryptography and idna | |
from OpenSSL import SSL | |
from cryptography import x509 | |
from cryptography.x509.oid import NameOID | |
import idna | |
from socket import socket |
NewerOlder