Skip to content

Instantly share code, notes, and snippets.

Jamar Walker webguywalker

Block or report user

Report or block webguywalker

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@webguywalker
webguywalker / aws_mfa.sh
Created Sep 25, 2018
authenticate aws cli when mfa is enabled
View aws_mfa.sh
#!/bin/bash
help () {
echo 'Usage: sh aws_mfa.sh "$mfa_arn" $mfa_code';
echo "\nWhere:"
echo ' - $mfa_arn, is aws arn to the mfa device found in iam profile'
echo ' - $mfa_code, is code generated by mfa device'
}
if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
@webguywalker
webguywalker / db-connect-test.php
Created Jun 8, 2018 — forked from M165437/db-connect-test.php
Script for a quick PHP MySQL DB connection test.
View db-connect-test.php
<?php
# Fill our vars and run on cli
# $ php -f db-connect-test.php
$dbname = 'name';
$dbuser = 'user';
$dbpass = 'pass';
$dbhost = 'host';
$link = mysqli_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");
You can’t perform that action at this time.