Skip to content

Instantly share code, notes, and snippets.

Aaron Traas AaronTraas

Block or report user

Report or block AaronTraas

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
@AaronTraas
AaronTraas / ansible_vagrant.sh
Created Dec 14, 2015
Install Homebrew, and use Homebrew to install Ansible and Vagrant and Virtualbox
View ansible_vagrant.sh
#!/bin/sh
# install .bash_profile
curl https://raw.githubusercontent.com/AaronTraas/osx-setup/master/bash_profile > ~/.bash_profile
# install homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install caskroom
brew tap phinze/cask && brew install brew-cask
@AaronTraas
AaronTraas / test_email_credentials.py
Last active Aug 29, 2015
[Python] test email credentials
View test_email_credentials.py
#!/usr/bin/python
from smtplib import SMTP
from email.MIMEText import MIMEText
SERVER = "<SMTP_server>"
USERNAME = "<SMTP_user_name>"
PASSWORD = "<SMTP_password>"
DESTINATION = "<destination_email_address>"
@AaronTraas
AaronTraas / .htaccess
Created Jan 15, 2015
PHP simple directory listing scripts
View .htaccess
DirectoryIndex index.php
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ index.php?/$1 [L]
@AaronTraas
AaronTraas / instagram.php
Last active Nov 10, 2015
Instagram auth test
View instagram.php
<!DOCTYPE html>
<html lang="en">
<head>
<title>Instagram Auth Test</title>
</head>
<body>
<h1>Instagram Auth Test</h1>
<?php
// Register your app here: http://instagram.com/developer/
$client_id = 'YOUR_CLIENT_ID';
@AaronTraas
AaronTraas / gist:9533041
Last active Dec 13, 2018
Updated AJAX email mailer PHP script
View gist:9533041
<?php
// My modifications to mailer script from:
// http://blog.teamtreehouse.com/create-ajax-contact-form
// Added input sanitizing to prevent injection
// Only process POST reqeusts.
if ($_SERVER["REQUEST_METHOD"] == "POST") {
// Get the form fields and remove whitespace.
$name = strip_tags(trim($_POST["name"]));
$name = str_replace(array("\r","\n"),array(" "," "),$name);
@AaronTraas
AaronTraas / gist:9252196
Created Feb 27, 2014
My .agignore -- mostly ignoring binaries
View gist:9252196
.git/
.hg/
images/
img/
tmp/
*.tags*
*.tmp*
*.old
*.pdf
*.png
You can’t perform that action at this time.