This file contains 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://travelspective.com', 'http://localhost/tsbuild/build') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://travelspective.com', 'http://localhost/tsbuild/build'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://travelspective.com', 'http://localhost/tsbuild/build'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://travelspective.com', 'http://localhost/tsbuild/build'); |
This file contains 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 | |
help_message() { | |
echo "Usage: $0 'username' 'password' 'https://urltologin.com'" | |
} | |
if [ -z $1 ] | |
then | |
help_message | |
exit 2 |
This file contains 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 | |
#Requirements: | |
# 1. ssh needs to be running on vm | |
# 2. VM_NAME and USER variable need to be set | |
#Set these variables (VM_NAME should equal the name of your virtualbox vm, USER should equal the name of your vm username) | |
VM_NAME="" |
This file contains 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
<# REMEMBER TO SetExecutionPolicy Unrestricted -Force #> | |
<# Download tech tools #> |
This file contains 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 | |
IP=$(sudo arp-scan --localnet --numeric --quiet --ignoredups | grep -E '([a-f0-9]{2}:){5}[a-f0-9]{2}' | awk '{print $1}') | |
echo $IP | fmt -w 1 |
This file contains 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 | |
## This script assumes that ssmtp is already configured on the server. | |
KEYFILE="/tmp/tarsnap.key" | |
EMAIL="[email protected]" | |
BACKUP_NAME="$(uname -n)-server-backup-$(date +%Y-%m-%d_%H-%M-%S)" | |
DATA_PATH="/tmp/path1 /tmp/path2" | |
TOTAL_BACKUPS='3' | |
EXCLUDE="" #space separated paths if you need multiple exclusions |
This file contains 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 | |
PORT='80' | |
SSH_PORT='22' | |
USERNAME='root' | |
HOSTNAME='myserver.com' | |
if ssh -p "$SSH_PORT" -t -t -L 9000:127.0.0.1:"$PORT" "$USERNAME"@"$HOSTNAME" & | |
then | |
SSH_PID=$(echo $!) | |
sleep 5 |
This file contains 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
#!/bin/bash | |
################################ | |
# OS X Install ISO Creater # | |
# # | |
# Author: shela # | |
################################ | |
####################################### | |
# Declarations |
This file contains 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
$domainServer = 'ad.mydomain.com' | |
$username = Read-Host -Prompt 'Username: ' | |
$newPassword = Read-Host -AsSecureString -Prompt 'Password: ' | |
Set-ADAccountPassword -Identity $username -Reset -NewPassword $newPassword |
This file contains 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
$domainServer = 'ad1.mydomain.com' | |
$user = Read-Host -Prompt 'Last Name: ' | |
get-aduser -f {SurName -eq $User} |
OlderNewer