View fixPermissionsSshDir.sh
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
sudo chown -R $USER:$USER ~/.ssh | |
find ~/.ssh -type f -exec chmod 400 -- {} + | |
find ~/.ssh -type f -name '*.pub' -exec chmod 444 -- {} + | |
sudo chmod 600 ~/.ssh/authorized_keys | |
sudo chmod 664 ~/.ssh/config |
View terraform-plan-debug
This file has been truncated, but you can view the full file.
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
2019/06/04 10:29:16 [INFO] Terraform version: 0.12.0 | |
2019/06/04 10:29:16 [INFO] Go runtime version: go1.12.4 | |
2019/06/04 10:29:16 [INFO] CLI args: []string{"/home/jpsimkins/bin/terraform", "plan"} | |
2019/06/04 10:29:16 [DEBUG] Attempting to open CLI config file: /home/jpsimkins/.terraformrc | |
2019/06/04 10:29:16 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
2019/06/04 10:29:16 [INFO] CLI command args: []string{"plan"} | |
2019/06/04 10:29:16 [INFO] Setting AWS metadata API timeout to 100ms | |
2019/06/04 10:29:17 [INFO] Ignoring AWS metadata API endpoint at default location as it doesn't return any instance-id | |
2019/06/04 10:29:17 [INFO] AWS Auth provider used: "SharedCredentialsProvider" | |
2019/06/04 10:29:17 [DEBUG] Trying to get account information via sts:GetCallerIdentity |
View WebServerPolicyForAssetsBucket
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:GetBucketLocation", | |
"s3:ListBucket", | |
"s3:ListAllMyBuckets" | |
], |
View 1installLetsEncryptForCentOS.sh
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
# Install LetsEncrypt | |
mkdir /opt/letsencrypt | |
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt | |
# Create config file for LetsEncrypt (Replace YOUR_EMAIL with... well...) | |
mkdir /etc/letsencrypt/ | |
touch /etc/letsencrypt/config.ini | |
echo "rsa-key-size = 4096" >> /etc/letsencrypt/config.ini | |
echo "email = YOUR_EMAIL" >> /etc/letsencrypt/config.ini | |
# Run LetsEncrypt to get cert (Replace DOMAIN_NAME and WEBROOT appropriately) | |
# DOMAIN_NAME nuff said |
View Dashboard.php
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
<?php | |
/** | |
* Remove dashboard widgets from users dashboard | |
* Allows Admin full dashboard experience | |
*/ | |
// Deny direct access | |
defined('ABSPATH') or die("No script kiddies please!"); | |
/** |
View get-page-by-slug.php
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
<?php | |
/** | |
* Retrieve a page given its slug. | |
* | |
* @global wpdb $wpdb WordPress database abstraction object. | |
* | |
* @param string $page_slug Page slug | |
* @param string $output Optional. Output type. OBJECT, ARRAY_N, or ARRAY_A. | |
* Default OBJECT. | |
* @param string|array $post_type Optional. Post type or array of post types. Default 'page'. |
View gist:4ab6dd25215de0e886eaa60503f6c129
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
I, [2017-06-28T21:18:53.286497 #25341] INFO -- default-centos-73: -----> Cleaning up any prior instances of <default-centos-73> | |
I, [2017-06-28T21:18:53.286928 #25341] INFO -- default-centos-73: -----> Destroying <default-centos-73>... | |
I, [2017-06-28T21:18:54.734821 #25341] INFO -- default-centos-73: ==> default: Forcing shutdown of VM... | |
I, [2017-06-28T21:18:55.832010 #25341] INFO -- default-centos-73: ==> default: Destroying VM and associated drives... | |
I, [2017-06-28T21:18:56.025565 #25341] INFO -- default-centos-73: Vagrant instance <default-centos-73> destroyed. | |
I, [2017-06-28T21:18:56.026326 #25341] INFO -- default-centos-73: Finished destroying <default-centos-73> (0m2.74s). | |
I, [2017-06-28T21:18:56.026415 #25341] INFO -- default-centos-73: -----> Testing <default-centos-73> | |
I, [2017-06-28T21:18:56.026486 #25341] INFO -- default-centos-73: -----> Creating <default-centos-73>... | |
I, [2017-06-28T21:18:57.023700 #25341] INFO -- default-centos-73: Bringing machine 'default' up with 'virtualbox' provid |
View make.sh
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 | |
apt-get install mc htop git unzip wget curl -y | |
echo | |
echo "=====================================================" | |
echo " WELCOME" | |
echo "=====================================================" | |
echo | |
echo "Hub" |
View getDatesForSpecificDayBetweenDates.php
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
<?php | |
/** | |
* Returns an array of dates for the day of the week between two date ranges | |
* Modified from stackoverflow question and improved for broader usage | |
* @link http://stackoverflow.com/a/4482605/650206 | |
* @param string|int $startDate | |
* @param string|int $endDate | |
* @param int $weekdayNumber | |
* @param string $dateFormat | |
* @param string $dateWeekNumberFormat w: 0 (sunday) - 6 (saturday) | N: 1 (monday) - 7 (sunday) |