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
UPDATE wp_options SET option_value = replace(option_value, 'http://www.example.com', 'https://www.example.com') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://www.example.com','https://www.example.com'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.example.com', 'https://www.example.com'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.example.com','https://www.example.com'); |
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
1. Create and start an EC2 instance with the same OS (+version) | |
2. Create a snapshot of the original root volume | |
3. Create a new volume from the snapshot (source) | |
4. Create a new larger/smaller volume (target) | |
5. Connect the source as xvdf | |
6. Connect the target as xvdg | |
Run these commands: | |
e2fsck -f /dev/xvdf1 |
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 bash | |
echo "Enter the account for which you want to export credentials and [enter]" | |
read account | |
export AWS_ACCESS_KEY_ID=$(aws configure get $account.aws_access_key_id) | |
export AWS_SECRET_ACCESS_KEY=$(aws configure get $account.aws_secret_access_key) | |
export AWS_REGION=$(aws configure get $account.region) |
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
import http.server | |
import socketserver | |
from urllib.parse import urlparse | |
from urllib.parse import parse_qs | |
PORT = 9001 | |
class r(http.server.SimpleHTTPRequestHandler): | |
def do_GET(self): | |
self.send_response(200) |
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
ip route list | grep default | grep -E 'dev (\w+)' -o | awk '{print $2}' |
NewerOlder