Skip to content

Instantly share code, notes, and snippets.

## Tutorial
https://initialcommit.com/blog/host-static-site-aws-s3
https://www.shortdark.net/5070/serving-a-s3-static-website-through-cloudfront-and-cloudflare/
## Endpoint
S3 Console > Properties > Bucket website endpoint
## Cloudfront
Use the long format of the S3 bucket (not the one from the dropdown), in our case it would be something like “example.com.s3-website.us-west-1.amazonaws.com”.
TXT records with site verification:
`@ 300 IN TXT "v=spf1 a include:_spf.google.com ~all " "google-site-verification=1-3-y-blah"`
## Documentation
[Online documentation](https://docs.bitnami.com/aws/apps/wordpress/)
## Get Wordpress Password
The user is *bitnami* and to get the password, run:
`cat bitnami_credentials`
## Htaccess
## Debug Android Device
Run:
`chrome://inspect/#devices`
### Fix error: Could not find an installed version of Gradle either in Android Studio, or on your system to install the gradle wrapper
Install Gradle
https://www.andreszsogon.com/upgrading-gradle-version-for-apache-cordova-mobile-apps/
## Restart Apache
`/opt/bitnami/ctlscript.sh restart apache`
## Disable TLS 1.0
You can find the SSLProtocol directive configured in the configuration file below:
**/opt/bitnami/apache2/conf/bitnami/bitnami.conf**
Change to:
## Step 1 — Create the RSA Key Pair
$ `ssh-keygen -f my_key_filename`
## Step 2 — Copy the Public Key to Ubuntu Server
`
cat /c/Temp/mkt_id_rsa.pub | ssh -i "/c/Users/lucia/OneDrive/Trabalho/Keys/AWS/take5/WebServers_OLD.pem" [email protected] "mkdir -p ~/.ssh && touch ~/.ssh/authorized_keys && chmod -R go= ~/.ssh && cat >> ~/.ssh/authorized_keys"
`
Install dependencies
Add respositores
`sudo apt-add-repository ppa:ondrej/php`
Install
`sudo apt-get install php7.3-dev libpcre3-dev gcc make`
<?php
/*
| -------------------------------------------------------------------
| Translation service (example 1)
| -------------------------------------------------------------------
*/
$di->setShared('translation', function () use ($di) {
$translate = new TranslationService(array(
'locale' => 'en_US',
$array = json_decode(json_encode($object), true);